Skip to content

Commit

Permalink
presence: return on having a full match on states in xml document
Browse files Browse the repository at this point in the history
- better handling after previous commit, related to GH #1427

(cherry picked from commit 9245153)
  • Loading branch information
miconda committed Feb 22, 2018
1 parent 09bb7fd commit 894b1ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/presence/presentity.c
Expand Up @@ -337,6 +337,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;
Expand Down Expand Up @@ -549,8 +550,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;
Expand Down

0 comments on commit 894b1ab

Please sign in to comment.