[sr-dev] git:5.2:8b6665b5: presence: test if event is dialog when attempting to delete old records
Daniel-Constantin Mierla
miconda at gmail.com
Tue Dec 4 09:11:21 CET 2018
Module: kamailio
Branch: 5.2
Commit: 8b6665b5d27fa8c36764078b9ae615075486a4b3
URL: https://github.com/kamailio/kamailio/commit/8b6665b5d27fa8c36764078b9ae615075486a4b3
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-12-04T09:05:55+01:00
presence: test if event is dialog when attempting to delete old records
(cherry picked from commit 55c7f781be7cc40d0cd161640a47244aad60c0e7)
---
Modified: src/modules/presence/presentity.c
---
Diff: https://github.com/kamailio/kamailio/commit/8b6665b5d27fa8c36764078b9ae615075486a4b3.diff
Patch: https://github.com/kamailio/kamailio/commit/8b6665b5d27fa8c36764078b9ae615075486a4b3.patch
---
diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c
index 5527d3736a..07d51c8982 100644
--- a/src/modules/presence/presentity.c
+++ b/src/modules/presence/presentity.c
@@ -380,6 +380,10 @@ int delete_presentity_if_dialog_id_exists(presentity_t* presentity,
int i = 0;
presentity_t old_presentity;
+ if (presentity->event->evp->type != EVENT_DIALOG) {
+ return 0;
+ }
+
query_cols[n_query_cols] = &str_domain_col;
query_ops[n_query_cols] = OP_EQ;
query_vals[n_query_cols].type = DB1_STR;
More information about the sr-dev
mailing list