[sr-dev] git:master:59dd3976: Merge pull request #795 from linuxmaniac/vseva/3855
GitHub
noreply at github.com
Fri Sep 23 13:34:53 CEST 2016
Module: kamailio
Branch: master
Commit: 59dd3976f52c71482123da8adc0939165c5476b4
URL: https://github.com/kamailio/kamailio/commit/59dd3976f52c71482123da8adc0939165c5476b4
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: GitHub <noreply at github.com>
Date: 2016-09-23T13:34:49+02:00
Merge pull request #795 from linuxmaniac/vseva/3855
presence: fix crash when no dialog.id on dialog-info xml
---
Modified: modules/presence/presentity.c
---
Diff: https://github.com/kamailio/kamailio/commit/59dd3976f52c71482123da8adc0939165c5476b4.diff
Patch: https://github.com/kamailio/kamailio/commit/59dd3976f52c71482123da8adc0939165c5476b4.patch
---
diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c
index e601153..00fdbfd 100644
--- a/modules/presence/presentity.c
+++ b/modules/presence/presentity.c
@@ -691,13 +691,13 @@ 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 (delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) {
+ goto error;
+ }
- if (delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) {
- goto error;
+ free(dialog_id);
}
-
- free(dialog_id);
-
LM_DBG("inserting %d cols into table\n",n_query_cols);
if (pa_dbf.insert(pa_db, query_cols, query_vals, n_query_cols) < 0)
More information about the sr-dev
mailing list