Module: sip-router
Branch: master
Commit: 28a7300cd83e135b1c0d5488cb289fc7415fbd8c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=28a7300…
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.
---
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)