[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40677] [PATCH 13/30] gnu: pjproject: Add and apply a patch fixing t
From: |
Jan Wielkiewicz |
Subject: |
[bug#40677] [PATCH 13/30] gnu: pjproject: Add and apply a patch fixing the crash. |
Date: |
Fri, 17 Apr 2020 02:34:16 +0200 |
---
gnu/packages/patches/pjproject-fix.patch | 21 +++++++++++++++++++++
gnu/packages/telephony.scm | 2 ++
2 files changed, 23 insertions(+)
create mode 100644 gnu/packages/patches/pjproject-fix.patch
diff --git a/gnu/packages/patches/pjproject-fix.patch
b/gnu/packages/patches/pjproject-fix.patch
new file mode 100644
index 0000000000..8d7e22f965
--- /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)
+ {
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 62bd8fd548..7ee9bdd9ab 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -655,6 +655,8 @@ calls and messages")
(url "https://github.com/pjsip/pjproject.git")
(commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
(modules '((guix build utils)))
+ (patches
+ (search-patches "pjproject-fix.patch"))
(snippet
'(begin
(let ((third-party-directories
--
2.26.1
- [bug#40677] [PATCH 07/30] gnu: libring: Add libnatpmp as an optional dependency; remove unnecessary comment., (continued)
- [bug#40677] [PATCH 06/30] gnu: Add libnatpmp., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 09/30] gnu: opendht: Bump to 2.0.0rc1., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 05/30] gnu: pjproject-jami: Use the jami-apply-dependency-patches procedure., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 08/30] gnu: libupnp: Bump to 1.8.6; change the download method to git-fetch; add missing dependencies., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 11/30] gnu: libring: Use ffmpeg-jami instead of ffmpeg., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 12/30] gnu: restinio: Bump to 0.6.1.1., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 13/30] gnu: pjproject: Add and apply a patch fixing the crash.,
Jan Wielkiewicz <=
- [bug#40677] [PATCH 14/30] gnu: jami.scm: Add a missing module., Jan Wielkiewicz, 2020/04/16
- [bug#40677] [PATCH 10/30] gnu: Add ffmpeg-jami., Jan Wielkiewicz, 2020/04/16
[bug#40677] [PATCH 16/30] gnu: pjproject-jami: Add a new SFL patch., Jan Wielkiewicz, 2020/04/16