Module: kamailio Branch: master Commit: f7f5b95f402e3bc3a5caa4e096a1ebdb165b20eb URL: https://github.com/kamailio/kamailio/commit/f7f5b95f402e3bc3a5caa4e096a1ebdb...
Author: Claudiu Boriga paul.boriga@1and1.ro Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-08-01T10:36:01+02:00
carrieroute: remove logically dead code
---
Modified: src/modules/carrierroute/cr_func.c
---
Diff: https://github.com/kamailio/kamailio/commit/f7f5b95f402e3bc3a5caa4e096a1ebdb... Patch: https://github.com/kamailio/kamailio/commit/f7f5b95f402e3bc3a5caa4e096a1ebdb...
---
diff --git a/src/modules/carrierroute/cr_func.c b/src/modules/carrierroute/cr_func.c index cfa614645c..6b6db1387b 100644 --- a/src/modules/carrierroute/cr_func.c +++ b/src/modules/carrierroute/cr_func.c @@ -673,12 +673,7 @@ int cr_do_route(struct sip_msg * _msg, gparam_t *_carrier, } carrier_data=NULL; - if (carrier_id < 0) { - if (cfg_get(carrierroute, carrierroute_cfg, fallback_default)) { - LM_NOTICE("invalid tree id %i specified, using default tree\n", carrier_id); - carrier_data = get_carrier_data(rd, rd->default_carrier_id); - } - } else if (carrier_id == 0) { + if (carrier_id == 0) { carrier_data = get_carrier_data(rd, rd->default_carrier_id); } else { carrier_data = get_carrier_data(rd, carrier_id); @@ -889,12 +884,7 @@ int cr_load_next_domain(struct sip_msg * _msg, gparam_t *_carrier, }
carrier_data=NULL; - if (carrier_id < 0) { - if (cfg_get(carrierroute, carrierroute_cfg, fallback_default)) { - LM_NOTICE("invalid tree id %i specified, using default tree\n", carrier_id); - carrier_data = get_carrier_data(rd, rd->default_carrier_id); - } - } else if (carrier_id == 0) { + if (carrier_id == 0) { carrier_data = get_carrier_data(rd, rd->default_carrier_id); } else { carrier_data = get_carrier_data(rd, carrier_id);