Module: kamailio
Branch: 5.1
Commit: 6770fe866dc6ed301b536a6132dc50e9844e720e
URL:
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e…
Author: Lucian Balaceanu <lucian.balaceanu(a)1and1.ro>
Committer: Lucian Balaceanu <lucian.balaceanu(a)1and1.ro>
Date: 2018-04-04T14:04:55+03:00
carrierroute: fixed duplicate options definition error when parsing src file
- added logic to reset_prefix_opts to reset all target_options fields (including
"visited")
(cherry picked from commit dc8faaf57a9c85b7133f112bdedd328a9520eb73)
---
Modified: src/modules/carrierroute/cr_config.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e…
Patch:
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e…
---
diff --git a/src/modules/carrierroute/cr_config.c b/src/modules/carrierroute/cr_config.c
index 40523d9544..920ae4142c 100644
--- a/src/modules/carrierroute/cr_config.c
+++ b/src/modules/carrierroute/cr_config.c
@@ -97,6 +97,9 @@ static int init_target_opts(){
}
static void reset_prefix_opts(){
+ memset(&(target_options[PO_MAX_TARGETS].value),'\0', sizeof(union
opt_data));
+ prefix_options[PO_MAX_TARGETS].visited = 0;
+ prefix_options[PO_MAX_TARGETS].no_elems = 0;
prefix_options[PO_MAX_TARGETS].value.int_data=-1;
}