Module: kamailio
Branch: master
Commit: 92451536a0ef985ff1d16c5531c232cd657532e1
URL:
https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-12T10:15:47+01:00
presence: return on having a full match on states in xml document
- better handling after previous commit, related to GH #1427
---
Modified: src/modules/presence/presentity.c
---
Diff:
https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232c…
Patch:
https://github.com/kamailio/kamailio/commit/92451536a0ef985ff1d16c5531c232c…
---
diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c
index 5f0eef6368..4674f0ad49 100644
--- a/src/modules/presence/presentity.c
+++ b/src/modules/presence/presentity.c
@@ -338,6 +338,7 @@ int ps_match_dialog_state_from_body(str body, int *is_dialog, char
*vstate)
if (tmp_state != NULL)
{
if(strcmp(tmp_state, vstate)!=0) {
+ /* state not matched */
xmlFree(tmp_state);
rmatch = 0;
goto done;
@@ -550,8 +551,8 @@ int ps_match_dialog_state(presentity_t* presentity, char* vstate)
rmatch = ps_match_dialog_state_from_body(tmp_db_body,
&db_is_dialog, vstate);
- if(rmatch<=0) {
- /* failure or not a match */
+ if(rmatch==1) {
+ /* having a full match */
pa_dbf.free_result(pa_db, result);
result = NULL;
return rmatch;