diff --git a/bin_interface.c b/bin_interface.c index e8fc685da49..24e968a4aa7 100644 --- a/bin_interface.c +++ b/bin_interface.c @@ -257,6 +257,11 @@ int bin_send(union sockaddr_union *dest) int rc, destlen; str st; + if (!bin) { + LM_ERR("binary listener not defined - cannot replicate!\n"); + return -1; + } + if (!dest) return 0; diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c index 7653bb4ddf9..55f7c7a5464 100644 --- a/modules/dialog/dialog.c +++ b/modules/dialog/dialog.c @@ -889,6 +889,12 @@ static int mod_init(void) mark_dlg_loaded_callbacks_run(); destroy_cachedb(0); + if (replication_dests && !bin) { + LM_ERR("You are using dialog replication, but there " + "is no bin_listen parameter defined!\n"); + return -1; + } + return 0; } diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c index 470a266ac45..2bbd4ee6a9c 100644 --- a/modules/usrloc/ul_mod.c +++ b/modules/usrloc/ul_mod.c @@ -348,6 +348,12 @@ static int mod_init(void) return -1; } + if (replication_dests && !bin) { + LM_ERR("You are using contacts replication, but there " + "is no bin_listen parameter defined!\n"); + return -1; + } + init_flag = 1; return 0;