Browse Source

ims_registrar_pcscf: Fix check for following Service-Routes (Route Header present, but only pointing locally)

Carsten Bock 8 years ago
parent
commit
3525d6ec7f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/modules/ims_registrar_pcscf/service_routes.c

+ 4 - 0
src/modules/ims_registrar_pcscf/service_routes.c

@@ -413,6 +413,10 @@ int check_service_routes(struct sip_msg* _m, udomain_t* _d) {
 			}
 			}
 			
 			
 			LM_DBG("num_routes is %d\n", num_routes);
 			LM_DBG("num_routes is %d\n", num_routes);
+			if (num_routes == 0) {
+				LM_DBG("Request doesn't have any route headers (except those pointing here), to check service-route...ignoring\n");		
+				goto error;
+			}
 			for (i=0; i<num_routes; i++) {
 			for (i=0; i<num_routes; i++) {
 				LM_DBG("route %d for checking is %s\n", i, routes[i]);
 				LM_DBG("route %d for checking is %s\n", i, routes[i]);
 			}
 			}