Module: kamailio
Branch: 5.2
Commit: 24e327280b1790ed15e16f6fd251c5596728abd8
URL:
https://github.com/kamailio/kamailio/commit/24e327280b1790ed15e16f6fd251c55…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-08-09T11:22:33+02:00
sipt: reset the static buffer for returning the number
- GH #2030
(cherry picked from commit 2c052974263c0785eb5280a935162673ac82dc6b)
---
Modified: src/modules/sipt/sipt.c
---
Diff:
https://github.com/kamailio/kamailio/commit/24e327280b1790ed15e16f6fd251c55…
Patch:
https://github.com/kamailio/kamailio/commit/24e327280b1790ed15e16f6fd251c55…
---
diff --git a/src/modules/sipt/sipt.c b/src/modules/sipt/sipt.c
index e75ecdc5b4..f64686dbc7 100644
--- a/src/modules/sipt/sipt.c
+++ b/src/modules/sipt/sipt.c
@@ -339,6 +339,7 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t
*param, p
str body;
body.s = get_body_part(msg, TYPE_APPLICATION,SUBTYPE_ISUP,&body.len);
+ sb_s_buf[0] = '\0';
if(body.s == NULL)
{
LM_INFO("No ISUP Message Found");
@@ -350,9 +351,9 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t
*param, p
LM_DBG("message not an ACM or CPG\n");
return -1;
}
-
+
isup_get_redirection_number((unsigned char*)body.s, body.len, sb_s_buf);
-
+
if (strlen(sb_s_buf) > 0)
{
pv_get_strzval(msg, param, res, sb_s_buf);