Module: kamailio
Branch: master
Commit: abdb02d3d2eec9fb45646f68996da3526c92ef58
URL:
https://github.com/kamailio/kamailio/commit/abdb02d3d2eec9fb45646f68996da35…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-26T12:51:50+02:00
dialog: updated ki_dlg_var_is_null() to use safer api function
---
Modified: src/modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/abdb02d3d2eec9fb45646f68996da35…
Patch:
https://github.com/kamailio/kamailio/commit/abdb02d3d2eec9fb45646f68996da35…
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index d4d2df07fa..2a7fd39948 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -2518,14 +2518,14 @@ static int ki_dlg_var_rm(sip_msg_t *msg, str *name)
static int ki_dlg_var_is_null(sip_msg_t *msg, str *name)
{
dlg_cell_t *dlg;
- str *pval;
+ int ret;
dlg = dlg_get_msg_dialog(msg);
if(dlg==NULL) {
return 1;
}
- pval = get_dlg_varref(dlg, name);
- if(pval==NULL || pval->s==NULL) {
+ ret = get_dlg_varstatus(dlg, name);
+ if(ret==1) {
return 1;
}
return -1;