[sr-dev] git:master:fa724d2c: Merge pull request #817 from snen/presentity_dialog_id_null_fix

GitHub noreply at github.com
Mon Oct 10 09:13:40 CEST 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2016-10-10T09:13:35+02:00

Merge pull request #817 from snen/presentity_dialog_id_null_fix

presence: fix crush if dialog id is NULL

---

Modified: modules/presence/presentity.c

---

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