Module: kamailio Branch: 5.2 Commit: 8b6665b5d27fa8c36764078b9ae615075486a4b3 URL: https://github.com/kamailio/kamailio/commit/8b6665b5d27fa8c36764078b9ae61507...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/8b6665b5d27fa8c36764078b9ae61507... Patch: https://github.com/kamailio/kamailio/commit/8b6665b5d27fa8c36764078b9ae61507...
---
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;