Browse code

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

Alex Hermann authored on 26/08/2014 14:36:15
Showing 1 changed files
... ...
@@ -398,7 +398,7 @@ inline void destroy_dlg(struct dlg_cell *dlg)
398 398
 
399 399
 	run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
400 400
 
401
-	if (dlg_enable_dmq)
401
+	if (dlg_enable_dmq && (dlg->iflags & DLG_IFLAG_DMQ_SYNC))
402 402
 		dlg_dmq_replicate_action(DLG_DMQ_RM, dlg, 0);
403 403
 
404 404
 	/* delete the dialog from DB*/
... ...
@@ -462,9 +462,9 @@ void destroy_dlg_table(void)
462 462
 		while (dlg) {
463 463
 			l_dlg = dlg;
464 464
 			dlg = dlg->next;
465
+			l_dlg->iflags &= ~DLG_IFLAG_DMQ_SYNC;
465 466
 			destroy_dlg(l_dlg);
466 467
 		}
467
-
468 468
 	}
469 469
 
470 470
 	shm_free(d_table);