Module: kamailio
Branch: master
Commit: dc8faaf57a9c85b7133f112bdedd328a9520eb73
URL:
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328…
Author: Lucian Balaceanu <lucian.balaceanu(a)1and1.ro>
Committer: Lucian Balaceanu <lucian.balaceanu(a)1and1.ro>
Date: 2018-04-04T10:52:56+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")
---
Modified: src/modules/carrierroute/cr_config.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328…
Patch:
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328…
---
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;
}