Selaa lähdekoodia

modules/ims_registrar_pcscf: remove erroneous return

jaybeepee 10 vuotta sitten
vanhempi
commit
b71143a6b1
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      modules/ims_registrar_pcscf/service_routes.c

+ 5 - 2
modules/ims_registrar_pcscf/service_routes.c

@@ -308,7 +308,11 @@ int check_service_routes(struct sip_msg* _m, udomain_t* _d) {
 	/* Lock this record while working with the data: */
 	ul.lock_udomain(_d, &vb->host, port, proto);
         
-        pcontact_t * c = getContactP(_m, _d);
+	pcontact_t * c = getContactP(_m, _d);
+	if (!c) {
+		LM_DBG("no contact found in usrloc when checking for service route\n");
+		goto error;
+	}
 
 	/* Check the route-set: */
 	if (_m->route) {
@@ -386,7 +390,6 @@ error:
 	/* Unlock domain */
 	ul.unlock_udomain(_d, &vb->host, port, proto);
 	return -1;
-    return 1;
 }
 
 static str route_start={"Route: <",8};