From bfb3e6cf44d4c7f41db0963eb4e7a86cad6e37d8 Mon Sep 17 00:00:00 2001 From: Liviu Chircu Date: Fri, 18 Jan 2019 13:35:50 +0000 Subject: [PATCH] usrloc: Avoid an unwanted error on a bad runtime preset --- modules/usrloc/ul_cluster.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/usrloc/ul_cluster.c b/modules/usrloc/ul_cluster.c index 1c35f4b5013..8dc85ef1a48 100644 --- a/modules/usrloc/ul_cluster.c +++ b/modules/usrloc/ul_cluster.c @@ -34,8 +34,11 @@ str ul_shtag_key = str_init("_st"); int ul_init_cluster(void) { - if (location_cluster <= 0) { - LM_ERR("Invalid 'location_cluster'! It must be a positive integer!\n"); + if (location_cluster == 0) + return 0; + + if (location_cluster < 0) { + LM_ERR("Invalid 'location_cluster'! It must be a positive integer!\n"); return -1; }