Skip to content

Commit

Permalink
[acc] fix bad condition when fetching context from dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ionutrazvanionita committed Jul 26, 2016
1 parent 2e36f29 commit 027fe92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/acc/acc_logic.c
Expand Up @@ -304,8 +304,10 @@ acc_ctx_t* try_fetch_ctx(void)

/* search the flags in transaction context */
if (t && (ret=ACC_GET_TM_CTX(t))==NULL) {
/* try fetching the context from dialog */
if (dlg && dlg_api.fetch_dlg_value(dlg, &acc_ctx_str, &ctx_s, 0) < 0) {
/* try fetching the context from dialog only if dialog exists */
if ( !dlg ||
(dlg &&
dlg_api.fetch_dlg_value(dlg, &acc_ctx_str, &ctx_s, 0) < 0)) {
/* can't find the flags anywhere */
return NULL;
} else { /* found them in dialog; set in the processing context
Expand Down

0 comments on commit 027fe92

Please sign in to comment.