Browse Source

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

Richard Good 12 years ago
parent
commit
fe914e1694
1 changed files with 4 additions and 4 deletions
  1. 4 4
      modules/dialog_ng/dlg_handlers.c

+ 4 - 4
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;