[sr-dev] git:master:c46a5f27: registrar: do make use of reg_xavp_cfg

Ian Yu-Hsun Lin ianyuhsunlin at gmail.com
Fri Jan 8 15:02:31 CET 2016


Module: kamailio
Branch: master
Commit: c46a5f2792b8553ade871d98cfe892c5a48a3ff6
URL: https://github.com/kamailio/kamailio/commit/c46a5f2792b8553ade871d98cfe892c5a48a3ff6

Author: Ian Yu-Hsun Lin <ianyuhsunlin at gmail.com>
Committer: Ian Yu-Hsun Lin <ianyuhsunlin at 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/c46a5f2792b8553ade871d98cfe892c5a48a3ff6.diff
Patch: https://github.com/kamailio/kamailio/commit/c46a5f2792b8553ade871d98cfe892c5a48a3ff6.patch

---

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;
 	}
 




More information about the sr-dev mailing list