Skip to content

Commit

Permalink
dialog: don't do nothing on timeout if dialog is not local
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo-78 authored and miconda committed Feb 11, 2022
1 parent b3314c8 commit 79c4c7d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/dialog/dlg_handlers.c
Expand Up @@ -1581,6 +1581,16 @@ void dlg_ontimeout(struct dlg_tl *tl)
dlg = ((struct dlg_cell*)((char *)(tl) -
(unsigned long)(&((struct dlg_cell*)0)->tl)));

if (dlg->bind_addr[0] == NULL) {
LM_DBG("skipping dialog without bind address\n");
return 0;
}

if (lookup_local_socket(&(dlg->bind_addr[0]->sock_str)) == NULL) {
LM_DBG("skipping non local dialog\n");
return 0;
}

/* mark dialog as expired */
dlg->dflags |= DLG_FLAG_EXPIRED;

Expand Down

0 comments on commit 79c4c7d

Please sign in to comment.