[sr-dev] git:master:d68d0126: presence: fix crush if dialog id is NULL

Dmitri Savolainen savolainen at erinaco.ru
Mon Oct 10 09:13:39 CEST 2016


Module: kamailio
Branch: master
Commit: d68d01262e59593e7976afea1b1c458815448e7a
URL: https://github.com/kamailio/kamailio/commit/d68d01262e59593e7976afea1b1c458815448e7a

Author: Dmitri Savolainen <savolainen at erinaco.ru>
Committer: Dmitri Savolainen <savolainen at erinaco.ru>
Date: 2016-10-07T19:32:53+03:00

presence: fix crush if dialog id is NULL

- check dialog_id is not NULL before call delete_presentity_if_dialog_id_exists

---

Modified: modules/presence/presentity.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d68d01262e59593e7976afea1b1c458815448e7a.diff
Patch: https://github.com/kamailio/kamailio/commit/d68d01262e59593e7976afea1b1c458815448e7a.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;
 				}




More information about the sr-dev mailing list