Module: sip-router
Branch: alexh/dialog-sync-wip
Commit: ed3d8ffe3fa256be871d32b0e8cb9a7c541df36e
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ed3d8ffe3fa256be871d32b0e8cb9a7c541df36e

Author: Alex Hermann <[email protected]>
Committer: Alex Hermann <[email protected]>
Date:   Tue Aug 26 16:36:15 2014 +0200

dialog: Don't try to DMQ-sync non-synced dlgs on destroy

---

 modules/dialog/dlg_hash.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index 169bef6..58abd24 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -398,7 +398,7 @@ inline void destroy_dlg(struct dlg_cell *dlg)
 
        run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
 
-       if (dlg_enable_dmq)
+       if (dlg_enable_dmq && (dlg->iflags & DLG_IFLAG_DMQ_SYNC))
                dlg_dmq_replicate_action(DLG_DMQ_RM, dlg, 0);
 
        /* delete the dialog from DB*/
@@ -462,9 +462,9 @@ void destroy_dlg_table(void)
                while (dlg) {
                        l_dlg = dlg;
                        dlg = dlg->next;
+                       l_dlg->iflags &= ~DLG_IFLAG_DMQ_SYNC;
                        destroy_dlg(l_dlg);
                }
-
        }
 
        shm_free(d_table);


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to