summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/pjproject-fix.patch
diff options
context:
space:
mode:
authorJan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>2020-04-17 02:34:16 +0200
committerGuix Patches Tester <>2020-04-17 01:38:09 +0100
commitbb6c7b4fd38e1a1bcf78dbaebe5d203861748a98 (patch)
tree68a679de71d66af21ce7293637d774ffd45a175a /gnu/packages/patches/pjproject-fix.patch
parenta138b557fa94fe2d92b41a43c12a09eb0c1d8f9a (diff)
downloadpatches-bb6c7b4fd38e1a1bcf78dbaebe5d203861748a98.tar
patches-bb6c7b4fd38e1a1bcf78dbaebe5d203861748a98.tar.gz
gnu: pjproject: Add and apply a patch fixing the crash.
Diffstat (limited to 'gnu/packages/patches/pjproject-fix.patch')
-rw-r--r--gnu/packages/patches/pjproject-fix.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/patches/pjproject-fix.patch b/gnu/packages/patches/pjproject-fix.patch
new file mode 100644
index 0000000000..1939943333
--- /dev/null
+++ b/gnu/packages/patches/pjproject-fix.patch
@@ -0,0 +1,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)
+ {