carrieroute: remove logically dead code
authorClaudiu Boriga <paul.boriga@1and1.ro>
Mon, 31 Jul 2017 14:36:55 +0000 (17:36 +0300)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 1 Aug 2017 08:36:01 +0000 (10:36 +0200)
src/modules/carrierroute/cr_func.c

index cfa6146..6b6db13 100644 (file)
@@ -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);