Skip to content

Commit

Permalink
topos: init xavp and context modparams to str null
Browse files Browse the repository at this point in the history
(cherry picked from commit 5e3f7e1)
  • Loading branch information
miconda committed May 13, 2021
1 parent 6a5a61b commit d2fd064
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/modules/topos/topos_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ str _tps_contact_host = str_init("");
int _tps_contact_mode = 0;
str _tps_cparam_name = str_init("tps");

str _tps_xavu_cfg = str_init("");
str _tps_xavu_field_acontact = str_init("");
str _tps_xavu_field_bcontact = str_init("");
str _tps_xavu_field_contact_host = str_init("");
str _tps_xavu_cfg = STR_NULL;
str _tps_xavu_field_acontact = STR_NULL;
str _tps_xavu_field_bcontact = STR_NULL;
str _tps_xavu_field_contact_host = STR_NULL;

str _tps_context_param = str_init("");
str _tps_context_value = str_init("");
str _tps_context_param = STR_NULL;
str _tps_context_value = STR_NULL;

sanity_api_t scb;

Expand Down Expand Up @@ -247,7 +247,8 @@ static int mod_init(void)
if(sruid_init(&_tps_sruid, '-', "tpsh", SRUID_INC)<0)
return -1;

if (_tps_contact_mode == 2 && (_tps_xavu_field_acontact.len <= 0
if (_tps_contact_mode == 2 && (_tps_xavu_cfg.len <= 0
|| _tps_xavu_field_acontact.len <= 0
|| _tps_xavu_field_bcontact.len <= 0)) {
LM_ERR("contact_mode parameter is 2,"
" but a_contact or b_contact xavu fields not defined\n");
Expand Down

0 comments on commit d2fd064

Please sign in to comment.