Module: kamailio Branch: master Commit: 5e3f7e1557d90a3e6f40eff41cc0b0bb317ab544 URL: https://github.com/kamailio/kamailio/commit/5e3f7e1557d90a3e6f40eff41cc0b0bb...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-05-13T17:53:18+02:00
topos: init xavp and context modparams to str null
---
Modified: src/modules/topos/topos_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/5e3f7e1557d90a3e6f40eff41cc0b0bb... Patch: https://github.com/kamailio/kamailio/commit/5e3f7e1557d90a3e6f40eff41cc0b0bb...
---
diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c index ba58920a6c..498cc8defe 100644 --- a/src/modules/topos/topos_mod.c +++ b/src/modules/topos/topos_mod.c @@ -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;
@@ -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");