Module: sip-router
Branch: 3.3
Commit: 5c217004880461e5d121a4b9640539e6bb5bc8bb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5c21700…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sat Sep 1 13:32:18 2012 +0300
modules/dialplan: always set type of attrs pvar value
- Type of attrs pvar value was not set when dp_translate didn't result
in any change.
(cherry picked from commit 28a7300cd83e135b1c0d5488cb289fc7415fbd8c)
---
modules/dialplan/dialplan.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/dialplan/dialplan.c b/modules/dialplan/dialplan.c
index 7b9a706..ec8c0e5 100644
--- a/modules/dialplan/dialplan.c
+++ b/modules/dialplan/dialplan.c
@@ -277,13 +277,14 @@ static int dp_update(struct sip_msg * msg, pv_spec_t * src,
pv_spec_t * dest,
int no_change;
pv_value_t val;
+ memset(&val, 0, sizeof(pv_value_t));
+ val.flags = PV_VAL_STR;
+
no_change = (dest->type == PVT_NONE) || (!repl->s) || (!repl->len);
if (no_change)
goto set_attr_pvar;
- memset(&val, 0, sizeof(pv_value_t));
- val.flags = PV_VAL_STR;
val.rs = *repl;
if(dest->setf(msg, &dest->pvp, (int)EQ_T, &val)<0)