Skip to content

Commit

Permalink
usrloc: Avoid an unwanted error on a bad runtime preset
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Jan 18, 2019
1 parent e06f0bf commit bfb3e6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/usrloc/ul_cluster.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit bfb3e6c

Please sign in to comment.