pjproject: sync patches with asterisk 18.2.2
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 14 Mar 2021 17:14:30 +0000 (18:14 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 14 Mar 2021 17:14:30 +0000 (18:14 +0100)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/pjproject/Makefile
libs/pjproject/patches/0070-fix-incorrect-copying-when-creating-cancel.patch [new file with mode: 0644]
libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch [deleted file]
libs/pjproject/patches/0080-fix-sdp-neg-modify-local-offer.patch [new file with mode: 0644]

index 556f44188cdc61d6635117b5effb868e99065bf4..28cc7345db23fecd16a9e74791d9d8630572c4b2 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pjproject
 PKG_VERSION:=2.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 # download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz"
 PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
diff --git a/libs/pjproject/patches/0070-fix-incorrect-copying-when-creating-cancel.patch b/libs/pjproject/patches/0070-fix-incorrect-copying-when-creating-cancel.patch
new file mode 100644 (file)
index 0000000..c8e4b4c
--- /dev/null
@@ -0,0 +1,32 @@
+From ce18018cc17bef8f80c08686e3a7b28384ef3ba5 Mon Sep 17 00:00:00 2001
+From: sauwming <ming@teluu.com>
+Date: Mon, 12 Oct 2020 13:31:25 +0800
+Subject: [PATCH] Fix incorrect copying of destination info when creating
+ CANCEL (#2546)
+
+---
+ pjsip/src/pjsip/sip_util.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/pjsip/src/pjsip/sip_util.c
++++ b/pjsip/src/pjsip/sip_util.c
+@@ -779,14 +779,14 @@ PJ_DEF(pj_status_t) pjsip_endpt_create_c
+           pjsip_hdr_clone(cancel_tdata->pool, req_tdata->saved_strict_route);
+     }
+-    /* Copy the destination host name from the original request */
+-    pj_strdup(cancel_tdata->pool, &cancel_tdata->dest_info.name,
+-            &req_tdata->dest_info.name);
+-
+-    /* Finally copy the destination info from the original request */
++    /* Copy the destination info from the original request */
+     pj_memcpy(&cancel_tdata->dest_info, &req_tdata->dest_info,
+             sizeof(req_tdata->dest_info));
++    /* Finally, copy the destination host name from the original request */
++    pj_strdup(cancel_tdata->pool, &cancel_tdata->dest_info.name,
++            &req_tdata->dest_info.name);
++
+     /* Done.
+      * Return the transmit buffer containing the CANCEL request.
+      */
diff --git a/libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch b/libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch
deleted file mode 100644 (file)
index c27a489..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c
-index 3b85b4273..a14009662 100644
---- a/pjmedia/src/pjmedia/sdp_neg.c
-+++ b/pjmedia/src/pjmedia/sdp_neg.c
-@@ -304,7 +304,6 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2(
- {
-     pjmedia_sdp_session *new_offer;
-     pjmedia_sdp_session *old_offer;
--    char media_used[PJMEDIA_MAX_SDP_MEDIA];
-     unsigned oi; /* old offer media index */
-     pj_status_t status;
-@@ -323,8 +322,19 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2(
-     /* Change state to STATE_LOCAL_OFFER */
-     neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
-+    /* When there is no active local SDP in state PJMEDIA_SDP_NEG_STATE_DONE,
-+     * it means that the previous initial SDP nego must have been failed,
-+     * so we'll just set the local SDP offer here.
-+     */
-+    if (!neg->active_local_sdp) {
-+      neg->initial_sdp_tmp = NULL;
-+      neg->initial_sdp = pjmedia_sdp_session_clone(pool, local);
-+      neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);
-+
-+      return PJ_SUCCESS;
-+    }
-+
-     /* Init vars */
--    pj_bzero(media_used, sizeof(media_used));
-     old_offer = neg->active_local_sdp;
-     new_offer = pjmedia_sdp_session_clone(pool, local);
diff --git a/libs/pjproject/patches/0080-fix-sdp-neg-modify-local-offer.patch b/libs/pjproject/patches/0080-fix-sdp-neg-modify-local-offer.patch
new file mode 100644 (file)
index 0000000..889d012
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/pjmedia/src/pjmedia/sdp_neg.c
++++ b/pjmedia/src/pjmedia/sdp_neg.c
+@@ -304,7 +304,6 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modi
+ {
+     pjmedia_sdp_session *new_offer;
+     pjmedia_sdp_session *old_offer;
+-    char media_used[PJMEDIA_MAX_SDP_MEDIA];
+     unsigned oi; /* old offer media index */
+     pj_status_t status;
+@@ -323,8 +322,19 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modi
+     /* Change state to STATE_LOCAL_OFFER */
+     neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
++    /* When there is no active local SDP in state PJMEDIA_SDP_NEG_STATE_DONE,
++     * it means that the previous initial SDP nego must have been failed,
++     * so we'll just set the local SDP offer here.
++     */
++    if (!neg->active_local_sdp) {
++      neg->initial_sdp_tmp = NULL;
++      neg->initial_sdp = pjmedia_sdp_session_clone(pool, local);
++      neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);
++
++      return PJ_SUCCESS;
++    }
++
+     /* Init vars */
+-    pj_bzero(media_used, sizeof(media_used));
+     old_offer = neg->active_local_sdp;
+     new_offer = pjmedia_sdp_session_clone(pool, local);