Przeglądaj źródła

ims_usrloc_scscf: fix contact_port_ip_match()

* same logic as in 22db60c1e29c26caacf4356849d2d1d550d68617
Victor Seva 1 tydzień temu
rodzic
commit
0cae5fa009
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      src/modules/ims_usrloc_scscf/impurecord.c

+ 7 - 0
src/modules/ims_usrloc_scscf/impurecord.c

@@ -712,6 +712,13 @@ int aor_to_contact(str *aor, str *contact)
 		contact->len = p - contact->s;
 	}
 
+	// remove default port 5060
+	if((p = memchr(contact->s, ':', contact->len))) {
+		if(contact->len - (p - contact->s) == 5 && !memcmp(p, ":5060", 5)) {
+			contact->len -= 5;
+		}
+	}
+
 	return ret;
 }