From ae0b4c90cb2a2d4ba868c29195835279cfac4530 Mon Sep 17 00:00:00 2001 From: Vlad Patrascu Date: Thu, 9 May 2019 18:12:29 +0300 Subject: [PATCH] dialog: extend the fix in commit 3abb14d to profiles without value (cherry picked from commit 3d081c88f4515ac0ed5424f43e6b5304b095ab85) --- modules/dialog/dlg_profile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/dialog/dlg_profile.c b/modules/dialog/dlg_profile.c index 0aa8a489c5..f37a4f1068 100644 --- a/modules/dialog/dlg_profile.c +++ b/modules/dialog/dlg_profile.c @@ -1113,7 +1113,8 @@ int noval_get_local_count(struct dlg_profile_table *profile) } for (cnt = profile->noval_local_counters[i]; cnt; cnt = cnt->next) { - if (profile_repl_cluster && dialog_repl_cluster) { + if (profile->repl_type == REPL_PROTOBIN && + profile_repl_cluster && dialog_repl_cluster) { /* don't count dialogs for which we have a backup role */ if (cnt->dlg && get_shtag_state(cnt->dlg) != SHTAG_STATE_BACKUP) n += cnt->n;