Module: kamailio
Branch: 4.4
Commit: 41806a15be4dfb99a2b4c708ffe521bc6ea53326
URL: 
https://github.com/kamailio/kamailio/commit/41806a15be4dfb99a2b4c708ffe521bc6ea53326

Author: Dmitri Savolainen <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2016-10-10T12:15:42+02:00

presence: fix crush if dialog id is NULL

- check dialog_id is not NULL before call delete_presentity_if_dialog_id_exists

(cherry picked from commit d68d01262e59593e7976afea1b1c458815448e7a)

---

Modified: modules/presence/presentity.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/41806a15be4dfb99a2b4c708ffe521bc6ea53326.diff
Patch: 
https://github.com/kamailio/kamailio/commit/41806a15be4dfb99a2b4c708ffe521bc6ea53326.patch

---

diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c
index 00fdbfd..cb819cf 100644
--- a/modules/presence/presentity.c
+++ b/modules/presence/presentity.c
@@ -691,7 +691,7 @@ int update_presentity(struct sip_msg* msg, presentity_t* 
presentity, str* body,
                        }
 
                        check_if_dialog(*body, &is_dialog, &dialog_id);
-                       if (is_dialog == 1) {
+                       if ( dialog_id ) {
                                if 
(delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) {
                                        goto error;
                                }


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to