unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 8d7e22f965f6080e025a4a889912b8dd3698623c 878 bytes (raw)
name: gnu/packages/patches/pjproject-fix.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
 
--- a/pjsip/src/pjsip-ua/sip_inv.c	(revision 6086)
+++ b/pjsip/src/pjsip-ua/sip_inv.c	(revision 6087)
@@ -314,10 +314,16 @@
     inv->cb_called |= (1 << state);
 
-    /* Call on_state_changed() callback. */
+    /* Call on_state_changed() callback.
+     * While in the callback, can the state shift to DISCONNECTED? Perhaps
+     * yes, so better avoid premature destroy of the invite session by
+     * temporarily increase its ref counter.
+     */
+    pjsip_inv_add_ref(inv);
     if (mod_inv.cb.on_state_changed && inv->notify && !dont_notify)
 	(*mod_inv.cb.on_state_changed)(inv, e);
+    pjsip_inv_dec_ref(inv);
 
     /* Only decrement when previous state is not already DISCONNECTED */
-    if (inv->state == PJSIP_INV_STATE_DISCONNECTED &&
+    if (state == PJSIP_INV_STATE_DISCONNECTED &&
 	prev_state != PJSIP_INV_STATE_DISCONNECTED) 
     {

debug log:

solving 8d7e22f965 ...
found 8d7e22f965 in https://yhetil.org/guix-patches/20200417003433.5608-13-tona_kosmicznego_smiecia@interia.pl/

applying [1/1] https://yhetil.org/guix-patches/20200417003433.5608-13-tona_kosmicznego_smiecia@interia.pl/
diff --git a/gnu/packages/patches/pjproject-fix.patch b/gnu/packages/patches/pjproject-fix.patch
new file mode 100644
index 0000000000..8d7e22f965

1:7: trailing whitespace.
--- a/pjsip/src/pjsip-ua/sip_inv.c	(revision 6086)\r
1:8: trailing whitespace.
+++ b/pjsip/src/pjsip-ua/sip_inv.c	(revision 6087)\r
1:9: trailing whitespace.
@@ -314,10 +314,16 @@\r
1:10: trailing whitespace.
     inv->cb_called |= (1 << state);\r
1:11: trailing whitespace.
 \r
Checking patch gnu/packages/patches/pjproject-fix.patch...
Applied patch gnu/packages/patches/pjproject-fix.patch cleanly.
warning: squelched 16 whitespace errors
warning: 21 lines add whitespace errors.

index at:
100644 8d7e22f965f6080e025a4a889912b8dd3698623c	gnu/packages/patches/pjproject-fix.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).