Pārlūkot izejas kodu

modules/ims_registrar_pcscf: Add domain unlock to prevent deadlock when processing notifies

Richard Good 11 gadi atpakaļ
vecāks
revīzija
3630f36c1e
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      modules/ims_registrar_pcscf/notify.c

+ 2 - 1
modules/ims_registrar_pcscf/notify.c

@@ -106,7 +106,8 @@ int process_contact(udomain_t * _d, int expires, str contact_uri, int contact_st
 	if (ul.get_pcontact(_d, &contact_uri, &pcontact) != 0) { //contact does not exist
 	if (ul.get_pcontact(_d, &contact_uri, &pcontact) != 0) { //contact does not exist
 	    if (contact_state == STATE_TERMINATED) {
 	    if (contact_state == STATE_TERMINATED) {
 		LM_DBG("This contact: <%.*s> is in state terminated and is not in usrloc, ignore\n", contact_uri.len, contact_uri.s);
 		LM_DBG("This contact: <%.*s> is in state terminated and is not in usrloc, ignore\n", contact_uri.len, contact_uri.s);
-		return 1;
+		ret = RESULT_CONTACTS_FOUND;
+		goto done;
 	    }
 	    }
 		LM_DBG("This contact: <%.*s> is in state active and is not in usrloc so adding it to usrloc, expires: %d which is in %d seconds\n", contact_uri.len, contact_uri.s, expires, expires-local_time_now);
 		LM_DBG("This contact: <%.*s> is in state active and is not in usrloc so adding it to usrloc, expires: %d which is in %d seconds\n", contact_uri.len, contact_uri.s, expires, expires-local_time_now);
 		if (ul.insert_pcontact(_d, &contact_uri, &ci, &pcontact) != 0) {
 		if (ul.insert_pcontact(_d, &contact_uri, &ci, &pcontact) != 0) {