Module: kamailio Branch: master Commit: 58820e6daec3b3fe3cca20f413c75a3e78c03375 URL: https://github.com/kamailio/kamailio/commit/58820e6daec3b3fe3cca20f413c75a3e78c03375
Author: The Root <r...@kamailio.org> Committer: The Root <r...@kamailio.org> Date: 2016-10-17T12:31:09+02:00 Merge branch 'master' of https://github.com/kamailio/kamailio # By Daniel-Constantin Mierla # Via Daniel-Constantin Mierla * 'master' of https://github.com/kamailio/kamailio: dialog: propre reparse of msg structure when doing cseq refresh ops --- Modified: modules/dialog/dlg_cseq.c --- Diff: https://github.com/kamailio/kamailio/commit/58820e6daec3b3fe3cca20f413c75a3e78c03375.diff Patch: https://github.com/kamailio/kamailio/commit/58820e6daec3b3fe3cca20f413c75a3e78c03375.patch --- diff --git a/modules/dialog/dlg_cseq.c b/modules/dialog/dlg_cseq.c index 4d60180..743a61d 100644 --- a/modules/dialog/dlg_cseq.c +++ b/modules/dialog/dlg_cseq.c @@ -53,12 +53,9 @@ static str _dlg_cseq_diff_var_name = str_init("cseq_diff"); /** * */ -int dlg_cseq_prepare_msg(sip_msg_t *msg) +static int dlg_cseq_prepare_msg(sip_msg_t *msg) { - if (parse_msg(msg->buf, msg->len, msg)!=0) { - LM_DBG("outbuf buffer parsing failed!"); - return 1; - } + LM_DBG("prepare msg for cseq update operations\n"); if(msg->first_line.type==SIP_REQUEST) { if(!IS_SIP(msg)) @@ -109,6 +106,19 @@ int dlg_cseq_prepare_msg(sip_msg_t *msg) /** * */ +static int dlg_cseq_prepare_new_msg(sip_msg_t *msg) +{ + LM_DBG("prepare new msg for cseq update operations\n"); + if (parse_msg(msg->buf, msg->len, msg)!=0) { + LM_DBG("outbuf buffer parsing failed!"); + return 1; + } + return dlg_cseq_prepare_msg(msg); +} + +/** + * + */ int dlg_cseq_update(sip_msg_t *msg) { dlg_cell_t *dlg = NULL; @@ -268,7 +278,7 @@ int dlg_cseq_msg_received(void *data) msg.buf = obuf->s; msg.len = obuf->len; - if(dlg_cseq_prepare_msg(&msg)!=0) { + if(dlg_cseq_prepare_new_msg(&msg)!=0) { goto done; } @@ -350,7 +360,7 @@ int dlg_cseq_msg_sent(void *data) msg.buf = obuf->s; msg.len = obuf->len; - if(dlg_cseq_prepare_msg(&msg)!=0) { + if(dlg_cseq_prepare_new_msg(&msg)!=0) { goto done; } _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev