[asterisk-commits] pjproject bundled: Update for pjproject 2.5.5 (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 29 11:30:43 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: pjproject_bundled:  Update for pjproject 2.5.5
......................................................................


pjproject_bundled:  Update for pjproject 2.5.5

Add more --disable-* switches to Makefile.rules including
--disable-opus which was causing bundled pjproject to fail with
"undefined reference" errors in libasteriskpj.

Changed PJ_ENABLE_EXTRA_CHECK to 1.

Removed 2 obsolete patches and added a new one.
The new one was merged by Teluu on 6/27/2016.

ASTERISK-26148 #close

Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063
---
M third-party/pjproject/Makefile.rules
D third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
D third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch
A third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
M third-party/pjproject/patches/config_site.h
M third-party/versions.mak
6 files changed, 86 insertions(+), 126 deletions(-)

Approvals:
  Alexei Gradinari: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules
index d2e7d25..739193a 100644
--- a/third-party/pjproject/Makefile.rules
+++ b/third-party/pjproject/Makefile.rules
@@ -1,9 +1,34 @@
 PJPROJECT_URL = http://www.pjsip.org/release/$(PJPROJECT_VERSION)
 
 # Even though we're not installing pjproject, we're setting prefix to /opt/pjproject to be safe
-PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec \
-	--disable-gsm-codec --disable-video --disable-v4l2 --disable-sound --disable-opencore-amr \
-	--disable-ilbc-codec --without-libyuv --disable-g7221-codec --disable-resample
+
+PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
+	--disable-speex-codec \
+	--disable-speex-aec \
+	--disable-speex-aec \
+	--disable-gsm-codec \
+	--disable-ilbc-codec \
+	--disable-l16-codec \
+	--disable-g711-codec \
+	--disable-g722-codec \
+	--disable-g7221-codec \
+	--disable-opencore-amr \
+	--disable-webrtc \
+	--disable-silk \
+	--disable-opus \
+	--disable-video \
+	--disable-v4l2 \
+	--disable-sound \
+	--disable-ext-sound \
+	--disable-oss \
+	--disable-sdl \
+	--disable-libyuv \
+	--disable-resample \
+	--disable-ffmpeg \
+	--disable-openh264 \
+	--disable-ipp \
+	--without-external-pa \
+	--with-external-srtp
 
 ifeq ($(shell uname -s),Linux)
    PJPROJECT_CONFIG_OPTS +=  --enable-epoll
diff --git a/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch b/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
deleted file mode 100644
index d2a47c6..0000000
--- a/third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From a5030c9b33b2c936879fbacb1d2ea5edc2979181 Mon Sep 17 00:00:00 2001
-From: George Joseph <gjoseph at digium.com>
-Date: Sat, 18 Jun 2016 10:14:34 -0600
-Subject: [PATCH] evsub:  Add APIs to add/decrement an event  subscription's
- group lock
-
-These APIs can be used to ensure that the evsub isn't destroyed before
-an application is finished using it.
----
- pjsip/include/pjsip-simple/evsub.h | 20 ++++++++++++++++++++
- pjsip/src/pjsip-simple/evsub.c     | 14 ++++++++++++++
- 2 files changed, 34 insertions(+)
-
-diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
-index 2dc4d69..31f85f8 100644
---- a/pjsip/include/pjsip-simple/evsub.h
-+++ b/pjsip/include/pjsip-simple/evsub.h
-@@ -490,6 +490,26 @@ PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
- PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id );
- 
- 
-+/**
-+ * Increment the event subscription's group lock.
-+ *
-+ * @param sub		The server subscription instance.
-+ *
-+ * @return		PJ_SUCCESS on success.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub);
-+
-+
-+/**
-+ * Decrement the event subscription's group lock.
-+ *
-+ * @param sub		The server subscription instance.
-+ *
-+ * @return		PJ_SUCCESS on success.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub);
-+
-+
- 
- PJ_END_DECL
- 
-diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
-index 7cd8859..68a9564 100644
---- a/pjsip/src/pjsip-simple/evsub.c
-+++ b/pjsip/src/pjsip-simple/evsub.c
-@@ -831,7 +831,21 @@ static pj_status_t evsub_create( pjsip_dialog *dlg,
-     return PJ_SUCCESS;
- }
- 
-+/*
-+ * Increment the event subscription's group lock.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub)
-+{
-+    return pj_grp_lock_add_ref(sub->grp_lock);
-+}
- 
-+/*
-+ * Decrement the event subscription's group lock.
-+ */
-+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub)
-+{
-+    return pj_grp_lock_dec_ref(sub->grp_lock);
-+}
- 
- /*
-  * Create client subscription session.
--- 
-2.5.5
-
diff --git a/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch b/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch
deleted file mode 100644
index d8a9adb..0000000
--- a/third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b7cb93b0e1729589a71e8b30d9a9893f0918e2a2 Mon Sep 17 00:00:00 2001
-From: George Joseph <george.joseph at fairview5.com>
-Date: Mon, 30 May 2016 11:58:22 -0600
-Subject: [PATCH] sip_transport_tcp/tls:  Set factory on transports created
- from accept
-
-The ability to re-use tcp and tls transports when a factory is
-specified now depends on transport->factory being set which is a new field
-in 2.5.  This was being set only on new outgoing sockets not on
-incoming sockets.  The result was that a client REGISTER created a new
-socket but without the factory set, the next outgoing request to the
-client, OPTIONS, INVITE, etc, would attempt to create another socket
-which the client would refuse.
-
-This patch sets the factory on transports created as a result of an
-accept.
----
- pjsip/src/pjsip/sip_transport_tcp.c | 1 +
- pjsip/src/pjsip/sip_transport_tls.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c
-index 1bbb324..00eb8fc 100644
---- a/pjsip/src/pjsip/sip_transport_tcp.c
-+++ b/pjsip/src/pjsip/sip_transport_tcp.c
-@@ -713,6 +713,7 @@ static pj_status_t tcp_create( struct tcp_listener *listener,
-     tcp->base.send_msg = &tcp_send_msg;
-     tcp->base.do_shutdown = &tcp_shutdown;
-     tcp->base.destroy = &tcp_destroy_transport;
-+    tcp->base.factory = &listener->factory;
- 
-     /* Create group lock */
-     status = pj_grp_lock_create(pool, NULL, &tcp->grp_lock);
-diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
-index a83ac32..36ee70d 100644
---- a/pjsip/src/pjsip/sip_transport_tls.c
-+++ b/pjsip/src/pjsip/sip_transport_tls.c
-@@ -742,6 +742,7 @@ static pj_status_t tls_create( struct tls_listener *listener,
-     tls->base.send_msg = &tls_send_msg;
-     tls->base.do_shutdown = &tls_shutdown;
-     tls->base.destroy = &tls_destroy_transport;
-+    tls->base.factory = &listener->factory;
- 
-     tls->ssock = ssock;
- 
--- 
-2.5.5
-
diff --git a/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch b/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
new file mode 100644
index 0000000..c4288a3
--- /dev/null
+++ b/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
@@ -0,0 +1,56 @@
+From 33fd755e819dc85a96718abc0ae26a9b46f14800 Mon Sep 17 00:00:00 2001
+From: nanang <nanang at localhost>
+Date: Thu, 28 Jul 2016 08:21:45 +0000
+Subject: [PATCH 2/3] Fix #1946: Avoid deinitialization of uninitialized client
+ auth session.
+
+---
+ pjsip/src/pjsip/sip_dialog.c | 18 ++++++------------
+ 1 file changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c
+index f03885d..421ddc4 100644
+--- a/pjsip/src/pjsip/sip_dialog.c
++++ b/pjsip/src/pjsip/sip_dialog.c
+@@ -92,6 +92,12 @@ static pj_status_t create_dialog( pjsip_user_agent *ua,
+     pj_list_init(&dlg->inv_hdr);
+     pj_list_init(&dlg->rem_cap_hdr);
+ 
++    /* Init client authentication session. */
++    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
++				 dlg->pool, 0);
++    if (status != PJ_SUCCESS)
++	goto on_error;
++
+     status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_);
+     if (status != PJ_SUCCESS)
+ 	goto on_error;
+@@ -283,12 +289,6 @@ PJ_DEF(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
+     /* Initial route set is empty. */
+     pj_list_init(&dlg->route_set);
+ 
+-    /* Init client authentication session. */
+-    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+-				 dlg->pool, 0);
+-    if (status != PJ_SUCCESS)
+-	goto on_error;
+-
+     /* Register this dialog to user agent. */
+     status = pjsip_ua_register_dlg( ua, dlg );
+     if (status != PJ_SUCCESS)
+@@ -506,12 +506,6 @@ pj_status_t create_uas_dialog( pjsip_user_agent *ua,
+     }
+     dlg->route_set_frozen = PJ_TRUE;
+ 
+-    /* Init client authentication session. */
+-    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+-				 dlg->pool, 0);
+-    if (status != PJ_SUCCESS)
+-	goto on_error;
+-
+     /* Increment the dialog's lock since tsx may cause the dialog to be
+      * destroyed prematurely (such as in case of transport error).
+      */
+-- 
+2.7.4
+
diff --git a/third-party/pjproject/patches/config_site.h b/third-party/pjproject/patches/config_site.h
index eb9f8b1..07e4d97 100644
--- a/third-party/pjproject/patches/config_site.h
+++ b/third-party/pjproject/patches/config_site.h
@@ -19,7 +19,7 @@
 #define PJ_SCANNER_USE_BITWISE	0
 #define PJ_OS_HAS_CHECK_STACK	0
 #define PJ_LOG_MAX_LEVEL		3
-#define PJ_ENABLE_EXTRA_CHECK	0
+#define PJ_ENABLE_EXTRA_CHECK	1
 #define PJSIP_MAX_TSX_COUNT		((64*1024)-1)
 #define PJSIP_MAX_DIALOG_COUNT	((64*1024)-1)
 #define PJSIP_UDP_SO_SNDBUF_SIZE	(512*1024)
diff --git a/third-party/versions.mak b/third-party/versions.mak
index ca40531..a4d7874 100644
--- a/third-party/versions.mak
+++ b/third-party/versions.mak
@@ -1,2 +1,2 @@
 
-PJPROJECT_VERSION = 2.5
+PJPROJECT_VERSION = 2.5.5

-- 
To view, visit https://gerrit.asterisk.org/3326
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list