Module: sip-router Branch: alexh/dialog-sync-wip Commit: 966dae63edd0df87f53a4172116caf0c31f98622 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=966dae63...
Author: Alex Hermann alex@speakup.nl Committer: Alex Hermann alex@speakup.nl Date: Thu Aug 7 11:22:53 2014 +0200
dialog: Delete dialog on negative ack, not tm destroy
Do what the comments say, destroy the dialog on reception of a negative ACK instead of delaying it until the transaction is cleaned up. Keep the old behaviour as backup for when the ACK is missing.
---
modules/dialog/dlg_handlers.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c index 3e3c047..9d78dca 100644 --- a/modules/dialog/dlg_handlers.c +++ b/modules/dialog/dlg_handlers.c @@ -466,7 +466,7 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param) goto done; }
- if (type==TMCB_DESTROY) + if (type & (TMCB_DESTROY|TMCB_ACK_NEG_IN)) event = DLG_EVENT_TDEL; else if (param->code<200) event = DLG_EVENT_RPL1xx; @@ -963,7 +963,7 @@ int dlg_set_tm_waitack(tm_cell_t *t, dlg_cell_t *dlg) } dlg_ref(dlg, 1); if ( d_tmb.register_tmcb( NULL, t, - TMCB_DESTROY, + TMCB_DESTROY|TMCB_ACK_NEG_IN, dlg_ontdestroy, (void*)iuid, dlg_iuid_sfree)<0 ) { LM_ERR("failed to register TMCB to wait for negative ACK\n"); dlg_unref(dlg, 1);