Module: sip-router Branch: master Commit: fe914e16945caf6c5c11b81514dff89a0739b30e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fe914e16...
Author: Richard Good richard.good@smilecoms.com Committer: Richard Good richard.good@smilecoms.com Date: Wed Nov 6 09:14:45 2013 +0200
modules/dialog_ng: Fix "CRITICAL bogus event 6 in state 2" problem Use TM callback TMCB_RESPONSE_READY instead of TMCB_RESPONSE_OUT to prevent race condition resulting in bogus event
---
modules/dialog_ng/dlg_handlers.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/dialog_ng/dlg_handlers.c b/modules/dialog_ng/dlg_handlers.c index 43b025b..262e923 100644 --- a/modules/dialog_ng/dlg_handlers.c +++ b/modules/dialog_ng/dlg_handlers.c @@ -380,12 +380,12 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param) { return; }
- if (type == TMCB_RESPONSE_READY) { - LM_DBG("TMCB_RESPONSE_READY\n"); + if (type == TMCB_RESPONSE_OUT) { + LM_DBG("TMCB_RESPONSE_OUT\n"); return; }
- if (type == TMCB_RESPONSE_OUT) { + if (type == TMCB_RESPONSE_READY) { if (rpl == FAKED_REPLY) { LM_DBG("Faked reply\n"); return; @@ -426,7 +426,7 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param) { LM_DBG("Calling next_state_dlg and event is %i\n", event); next_state_dlg(dlg, event, &old_state, &new_state, &unref, &to_tag);
- if (type == TMCB_RESPONSE_OUT) { + if (type == TMCB_RESPONSE_READY) { LM_DBG("Checking if there is an existing dialog_out entry with same to-tag");
dlg_entry_out = &dlg->dlg_entry_out;