Module: kamailio
Branch: master
Commit: c46a5f2792b8553ade871d98cfe892c5a48a3ff6
URL:
https://github.com/kamailio/kamailio/commit/c46a5f2792b8553ade871d98cfe892c…
Author: Ian Yu-Hsun Lin <ianyuhsunlin(a)gmail.com>
Committer: Ian Yu-Hsun Lin <ianyuhsunlin(a)gmail.com>
Date: 2016-01-07T19:10:51+08:00
registrar: do make use of reg_xavp_cfg
- prevent from resetting sock_flag to -1 when reg_xavp_cfg is set
---
Modified: modules/registrar/reg_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c46a5f2792b8553ade871d98cfe892c…
Patch:
https://github.com/kamailio/kamailio/commit/c46a5f2792b8553ade871d98cfe892c…
---
diff --git a/modules/registrar/reg_mod.c b/modules/registrar/reg_mod.c
index 98b136b..0d7c5ac 100644
--- a/modules/registrar/reg_mod.c
+++ b/modules/registrar/reg_mod.c
@@ -362,8 +362,14 @@ static int mod_init(void)
sock_hdr_name.len = 0;
sock_flag = -1;
}
+ } else if (reg_xavp_cfg.s) {
+ if (reg_xavp_cfg.len == 0 || sock_flag == -1) {
+ LM_WARN("empty reg_xavp_cfg or sock_flag no set -> resetting\n");
+ reg_xavp_cfg.len = 0;
+ sock_flag = -1;
+ }
} else if (sock_flag!=-1) {
- LM_WARN("sock_flag defined but no sock_hdr_name -> reseting flag\n");
+ LM_WARN("sock_flag defined but no sock_hdr_name or no reg_xavp_cfg -> resetting
flag\n");
sock_flag = -1;
}