From ee932827f8429009c769aac4ed6fb2996077158b Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Thu, 20 Dec 2018 12:32:45 +0200 Subject: [PATCH] dialog: do not replicate update messages on early This suppresses some errors generated by incomplete replicate messages (missing callee socket, tags, etc.) (cherry picked from commit 7dd023c2501579adb287506aa59c32801e57b1cc) --- modules/dialog/dlg_replication.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/dialog/dlg_replication.c b/modules/dialog/dlg_replication.c index ef7c642031a..84fcef9b49a 100644 --- a/modules/dialog/dlg_replication.c +++ b/modules/dialog/dlg_replication.c @@ -599,6 +599,11 @@ void replicate_dialog_updated(struct dlg_cell *dlg) dlg_lock_dlg(dlg); + if (dlg->state < DLG_STATE_CONFIRMED_NA) { + LM_DBG("not replicating update in state %d (%.*s)\n", dlg->state, + dlg->callid.len, dlg->callid.s); + goto end; + } if (dlg->state == DLG_STATE_DELETED) { /* we no longer need to update anything */ LM_WARN("not replicating dlg update message due to bad state %d (%.*s)\n",