all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 9bd58ee0e2bd41e36526fcac7b7eb7c8cf7290a0 2246 bytes (raw)
name: gnu/packages/patches/pjproject-multiple-listeners.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
diff --git a/pjproject/pjsip/src/pjsip/sip_transport.c b/pjproject_new/pjsip/src/pjsip/sip_transport.c
index 4b2cc1a..22e3603 100644
--- a/pjsip/src/pjsip/sip_transport.c
+++ b/pjsip/src/pjsip/sip_transport.c
@@ -1179,22 +1179,22 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_register_tpfactory( pjsip_tpmgr *mgr,
 
     pj_lock_acquire(mgr->lock);
 
-    /* Check that no factory with the same type has been registered. */
+    /* Check that no factory with the same type and bound address has been registered. */
     status = PJ_SUCCESS;
     for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) {
-	if (p->type == tpf->type) {
-	    status = PJSIP_ETYPEEXISTS;
-	    break;
-	}
-	if (p == tpf) {
-	    status = PJ_EEXISTS;
-	    break;
-	}
+        if (p->type == tpf->type && !pj_sockaddr_cmp(&tpf->local_addr, &p->local_addr)) {
+            status = PJSIP_ETYPEEXISTS;
+            break;
+        }
+        if (p == tpf) {
+            status = PJ_EEXISTS;
+            break;
+        }
     }
 
     if (status != PJ_SUCCESS) {
-	pj_lock_release(mgr->lock);
-	return status;
+        pj_lock_release(mgr->lock);
+        return status;
     }
 
     pj_list_insert_before(&mgr->factory_list, tpf);
@@ -1909,13 +1909,11 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,
 	pj_memcpy(&key.rem_addr, remote, addr_len);
 
 	transport = (pjsip_transport*)
-		    pj_hash_get(mgr->table, &key, key_len, NULL);
-
+    pj_hash_get(mgr->table, &key, key_len, NULL);
+    unsigned flag = pjsip_transport_get_flag_from_type(type);
 	if (transport == NULL) {
-	    unsigned flag = pjsip_transport_get_flag_from_type(type);
 	    const pj_sockaddr *remote_addr = (const pj_sockaddr*)remote;
 
-
 	    /* Ignore address for loop transports. */
 	    if (type == PJSIP_TRANSPORT_LOOP ||
 		     type == PJSIP_TRANSPORT_LOOP_DGRAM)
@@ -1954,6 +1952,11 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,
 	    return PJ_SUCCESS;
 	}
 
+    if (flag & PJSIP_TRANSPORT_SECURE) {
+        TRACE_((THIS_FILE, "Can't create new TLS transport with no provided suitable TLS listener."));
+        return PJSIP_ETPNOTSUITABLE;
+    }
+
 	/*
 	 * Transport not found!
 	 * Find factory that can create such transport.

debug log:

solving 9bd58ee ...
found 9bd58ee in https://yhetil.org/guix/87lh1xg425.fsf@openmailbox.org/

applying [1/1] https://yhetil.org/guix/87lh1xg425.fsf@openmailbox.org/
diff --git a/gnu/packages/patches/pjproject-multiple-listeners.patch b/gnu/packages/patches/pjproject-multiple-listeners.patch
new file mode 100644
index 0000000..9bd58ee

1:12: trailing whitespace.
 
1:14: trailing whitespace.
 
1:36: trailing whitespace.
 
1:43: trailing whitespace.
 
1:46: space before tab in indent.
 	pj_memcpy(&key.rem_addr, remote, addr_len);
Checking patch gnu/packages/patches/pjproject-multiple-listeners.patch...
Applied patch gnu/packages/patches/pjproject-multiple-listeners.patch cleanly.
warning: squelched 14 whitespace errors
warning: 19 lines add whitespace errors.

index at:
100644 9bd58ee0e2bd41e36526fcac7b7eb7c8cf7290a0	gnu/packages/patches/pjproject-multiple-listeners.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.