Module: kamailio
Branch: master
Commit: 666c9d1fcdde00dbdd2e87ff797e554af6d72b5c
URL:
https://github.com/kamailio/kamailio/commit/666c9d1fcdde00dbdd2e87ff797e554…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-14T08:22:20+02:00
pua_dialoginfo: fixed condition in mod init checking avp names
---
Modified: src/modules/pua_dialoginfo/pua_dialoginfo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/666c9d1fcdde00dbdd2e87ff797e554…
Patch:
https://github.com/kamailio/kamailio/commit/666c9d1fcdde00dbdd2e87ff797e554…
---
diff --git a/src/modules/pua_dialoginfo/pua_dialoginfo.c
b/src/modules/pua_dialoginfo/pua_dialoginfo.c
index 6141e3bdec..ab6569b2a8 100644
--- a/src/modules/pua_dialoginfo/pua_dialoginfo.c
+++ b/src/modules/pua_dialoginfo/pua_dialoginfo.c
@@ -618,7 +618,7 @@ __dialog_created(struct dlg_cell *dlg, int type, struct dlg_cb_params
*_params)
struct sip_msg *request = _params->req;
struct dlginfo_cell *dlginfo;
- if (request->REQ_METHOD != METHOD_INVITE)
+ if (request==NULL || request->REQ_METHOD != METHOD_INVITE)
return;
if(send_publish_flag > -1 && !(request->flags &
(1<<send_publish_flag)))
@@ -719,8 +719,8 @@ static int mod_init(void)
if(use_pubruri_avps) {
- if(!(pubruri_caller_avp && *pubruri_caller_avp)
- && (pubruri_callee_avp && *pubruri_callee_avp)) {
+ if((pubruri_caller_avp==NULL || *pubruri_caller_avp==0)
+ || (pubruri_callee_avp==NULL || *pubruri_callee_avp==0)) {
LM_ERR("pubruri_caller_avp and pubruri_callee_avp must be set,"
" if use_pubruri_avps is enabled\n");
return -1;