Module: kamailio
Branch: master
Commit: 966dab757d094b99c48431f7a22c2b557d53c4d1
URL:
https://github.com/kamailio/kamailio/commit/966dab757d094b99c48431f7a22c2b5…
Author: Victor Seva <vseva(a)sipwise.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2022-11-10T11:47:14+01:00
dialog: dlg_set_var() support empty totag parameter
* support setting vars for non established dialogs
---
Modified: src/modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/966dab757d094b99c48431f7a22c2b5…
Patch:
https://github.com/kamailio/kamailio/commit/966dab757d094b99c48431f7a22c2b5…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 7fa6bd57c68..9fcff42fb98 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -1922,7 +1922,7 @@ static int ki_dlg_set_var(sip_msg_t *msg, str *sc, str *sf, str *st,
str *key, s
LM_ERR("invalid From tag parameter\n");
return -1;
}
- if(st==NULL || st->s==NULL || st->len == 0) {
+ if(st==NULL) {
LM_ERR("invalid To tag parameter\n");
return -1;
}
@@ -1966,11 +1966,7 @@ static int w_dlg_set_var(struct sip_msg *msg, char *ci, char *ft,
char *tt, char
LM_ERR("unable to get To Tag\n");
return -1;
}
- if(st.s==NULL || st.len == 0)
- {
- LM_ERR("invalid To tag parameter\n");
- return -1;
- }
+
if(fixup_get_svalue(msg, (gparam_p)key, &k)!=0)
{
LM_ERR("unable to get key name\n");