|
From: <abe...@us...> - 2017-06-07 17:59:58
|
Revision: 8381
http://sourceforge.net/p/astlinux/code/8381
Author: abelbeck
Date: 2017-06-07 17:59:55 +0000 (Wed, 07 Jun 2017)
Log Message:
-----------
asterisk, version bump to 13.16.0, added 4 pjsip patches
Modified Paths:
--------------
branches/1.0/package/asterisk/asterisk-13-configure-menuselect-cross-fix.patch
branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch
branches/1.0/package/asterisk/asterisk.mk
Added Paths:
-----------
branches/1.0/package/asterisk/asterisk-13-configure-have-usable-eventfd.patch
branches/1.0/package/pjsip/pjsip-0035-r5572-svn-backport-dialog-transaction-deadlock.patch
branches/1.0/package/pjsip/pjsip-0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch
branches/1.0/package/pjsip/pjsip-0037-r5576-svn-backport-session-timer-crash.patch
branches/1.0/package/pjsip/pjsip-0048-r5576-svn-backport-tls-crash.patch
Added: branches/1.0/package/asterisk/asterisk-13-configure-have-usable-eventfd.patch
===================================================================
--- branches/1.0/package/asterisk/asterisk-13-configure-have-usable-eventfd.patch (rev 0)
+++ branches/1.0/package/asterisk/asterisk-13-configure-have-usable-eventfd.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -0,0 +1,12 @@
+--- asterisk-13.16.0/configure.ac.orig 2017-06-07 11:56:41.261126679 -0500
++++ asterisk-13.16.0/configure.ac 2017-06-07 12:01:48.732815227 -0500
+@@ -1104,7 +1104,8 @@
+ [return eventfd(0, EFD_NONBLOCK | EFD_SEMAPHORE) == -1;])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_EVENTFD], 1, [Define to 1 if your system supports eventfd and the EFD_NONBLOCK and EFD_SEMAPHORE flags.]),
+- AC_MSG_RESULT(no)
++ AC_MSG_RESULT(no),
++ AC_MSG_RESULT(cross-compile)
+ )
+
+ AST_GCC_ATTRIBUTE(pure)
Modified: branches/1.0/package/asterisk/asterisk-13-configure-menuselect-cross-fix.patch
===================================================================
--- branches/1.0/package/asterisk/asterisk-13-configure-menuselect-cross-fix.patch 2017-06-07 16:12:33 UTC (rev 8380)
+++ branches/1.0/package/asterisk/asterisk-13-configure-menuselect-cross-fix.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -1,6 +1,6 @@
--- asterisk-13/configure.ac.orig 2014-01-24 16:52:23.000000000 -0600
+++ asterisk-13/configure.ac 2014-01-24 16:55:14.000000000 -0600
-@@ -2670,11 +2670,13 @@
+@@ -2659,11 +2659,13 @@
AC_OUTPUT
${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
Modified: branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch
===================================================================
--- branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch 2017-06-07 16:12:33 UTC (rev 8380)
+++ branches/1.0/package/asterisk/asterisk-13-extension-changed-verbosity-chan_sip.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -1,6 +1,6 @@
--- asterisk-13/channels/chan_sip.c.orig 2015-04-23 10:22:04.000000000 -0500
+++ asterisk-13/channels/chan_sip.c 2015-04-23 10:22:40.000000000 -0500
-@@ -17449,7 +17449,7 @@
+@@ -17477,7 +17477,7 @@
}
if (!force) {
Modified: branches/1.0/package/asterisk/asterisk.mk
===================================================================
--- branches/1.0/package/asterisk/asterisk.mk 2017-06-07 16:12:33 UTC (rev 8380)
+++ branches/1.0/package/asterisk/asterisk.mk 2017-06-07 17:59:55 UTC (rev 8381)
@@ -7,7 +7,7 @@
ASTERISK_VERSION := 11.25.1
else
ifeq ($(BR2_PACKAGE_ASTERISK_v13),y)
-ASTERISK_VERSION := 13.15.1
+ASTERISK_VERSION := 13.16.0
else
ASTERISK_VERSION := 15.0.0
endif
Added: branches/1.0/package/pjsip/pjsip-0035-r5572-svn-backport-dialog-transaction-deadlock.patch
===================================================================
--- branches/1.0/package/pjsip/pjsip-0035-r5572-svn-backport-dialog-transaction-deadlock.patch (rev 0)
+++ branches/1.0/package/pjsip/pjsip-0035-r5572-svn-backport-dialog-transaction-deadlock.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -0,0 +1,32 @@
+Index: trunk/pjsip/src/pjsip/sip_transaction.c
+===================================================================
+--- a/pjsip/src/pjsip/sip_transaction.c (revision 5244)
++++ b/pjsip/src/pjsip/sip_transaction.c (revision 5572)
+@@ -1231,5 +1231,27 @@
+ PJSIP_EVENT_INIT_TSX_STATE(e, tsx, event_src_type, event_src,
+ prev_state);
++
++ /* For timer event, release lock to avoid deadlock.
++ * This should be safe because:
++ * 1. The tsx state just switches to TERMINATED or DESTROYED.
++ * 2. There should be no other processing taking place. All other
++ * events, such as the ones handled by tsx_on_state_terminated()
++ * should be ignored.
++ * 3. tsx_shutdown() hasn't been called.
++ * Refer to ticket #2001 (https://trac.pjsip.org/repos/ticket/2001).
++ */
++ if (event_src_type == PJSIP_EVENT_TIMER &&
++ (pj_timer_entry *)event_src == &tsx->timeout_timer)
++ {
++ pj_grp_lock_release(tsx->grp_lock);
++ }
++
+ (*tsx->tsx_user->on_tsx_state)(tsx, &e);
++
++ if (event_src_type == PJSIP_EVENT_TIMER &&
++ (pj_timer_entry *)event_src == &tsx->timeout_timer)
++ {
++ pj_grp_lock_acquire(tsx->grp_lock);
++ }
+ }
+
Added: branches/1.0/package/pjsip/pjsip-0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch
===================================================================
--- branches/1.0/package/pjsip/pjsip-0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch (rev 0)
+++ branches/1.0/package/pjsip/pjsip-0036-r5573-svn-backport-ua-pjsua-transaction-deadlock.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -0,0 +1,119 @@
+Index: trunk/pjsip/include/pjsip/sip_transaction.h
+===================================================================
+--- a/pjsip/include/pjsip/sip_transaction.h (revision 5572)
++++ b/pjsip/include/pjsip/sip_transaction.h (revision 5573)
+@@ -180,4 +180,8 @@
+ * is created by calling #pjsip_tsx_create_key() from an incoming message.
+ *
++ * IMPORTANT: To prevent deadlock, application should use
++ * #pjsip_tsx_layer_find_tsx2() instead which only adds a reference to
++ * the transaction instead of locking it.
++ *
+ * @param key The key string to find the transaction.
+ * @param lock If non-zero, transaction will be locked before the
+@@ -190,4 +194,19 @@
+ PJ_DECL(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key,
+ pj_bool_t lock );
++
++/**
++ * Find a transaction with the specified key. The transaction key normally
++ * is created by calling #pjsip_tsx_create_key() from an incoming message.
++ *
++ * @param key The key string to find the transaction.
++ * @param add_ref If non-zero, transaction's reference will be added
++ * by one before the function returns, to make sure that
++ * it's not deleted by other threads.
++ *
++ * @return The matching transaction instance, or NULL if transaction
++ * can not be found.
++ */
++PJ_DECL(pjsip_transaction*) pjsip_tsx_layer_find_tsx2( const pj_str_t *key,
++ pj_bool_t add_ref );
+
+ /**
+Index: trunk/pjsip/src/pjsip/sip_transaction.c
+===================================================================
+--- a/pjsip/src/pjsip/sip_transaction.c (revision 5572)
++++ b/pjsip/src/pjsip/sip_transaction.c (revision 5573)
+@@ -642,6 +642,6 @@
+ * Find a transaction.
+ */
+-PJ_DEF(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key,
+- pj_bool_t lock )
++static pjsip_transaction* find_tsx( const pj_str_t *key, pj_bool_t lock,
++ pj_bool_t add_ref )
+ {
+ pjsip_transaction *tsx;
+@@ -655,5 +655,5 @@
+ /* Prevent the transaction to get deleted before we have chance to lock it.
+ */
+- if (tsx && lock)
++ if (tsx)
+ pj_grp_lock_add_ref(tsx->grp_lock);
+
+@@ -667,10 +667,27 @@
+ PJ_RACE_ME(5);
+
+- if (tsx && lock) {
+- pj_grp_lock_acquire(tsx->grp_lock);
+- pj_grp_lock_dec_ref(tsx->grp_lock);
++ if (tsx) {
++ if (lock)
++ pj_grp_lock_acquire(tsx->grp_lock);
++
++ if (!add_ref)
++ pj_grp_lock_dec_ref(tsx->grp_lock);
+ }
+
+ return tsx;
++}
++
++
++PJ_DEF(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key,
++ pj_bool_t lock )
++{
++ return find_tsx(key, lock, PJ_FALSE);
++}
++
++
++PJ_DEF(pjsip_transaction*) pjsip_tsx_layer_find_tsx2( const pj_str_t *key,
++ pj_bool_t add_ref )
++{
++ return find_tsx(key, PJ_FALSE, add_ref);
+ }
+
+Index: trunk/pjsip/src/pjsip/sip_ua_layer.c
+===================================================================
+--- a/pjsip/src/pjsip/sip_ua_layer.c (revision 5572)
++++ b/pjsip/src/pjsip/sip_ua_layer.c (revision 5573)
+@@ -552,10 +552,10 @@
+
+ /* Lookup the INVITE transaction */
+- tsx = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
++ tsx = pjsip_tsx_layer_find_tsx2(&key, PJ_TRUE);
+
+ /* We should find the dialog attached to the INVITE transaction */
+ if (tsx) {
+ dlg = (pjsip_dialog*) tsx->mod_data[mod_ua.mod.id];
+- pj_grp_lock_release(tsx->grp_lock);
++ pj_grp_lock_dec_ref(tsx->grp_lock);
+
+ /* Dlg may be NULL on some extreme condition
+Index: trunk/pjsip/src/pjsip-ua/sip_inv.c
+===================================================================
+--- a/pjsip/src/pjsip-ua/sip_inv.c (revision 5572)
++++ b/pjsip/src/pjsip-ua/sip_inv.c (revision 5573)
+@@ -3276,5 +3276,5 @@
+ pjsip_tsx_create_key(rdata->tp_info.pool, &key, PJSIP_ROLE_UAS,
+ pjsip_get_invite_method(), rdata);
+- invite_tsx = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
++ invite_tsx = pjsip_tsx_layer_find_tsx2(&key, PJ_TRUE);
+
+ if (invite_tsx == NULL) {
+@@ -3325,5 +3325,5 @@
+
+ if (invite_tsx)
+- pj_grp_lock_release(invite_tsx->grp_lock);
++ pj_grp_lock_dec_ref(invite_tsx->grp_lock);
+ }
+
Added: branches/1.0/package/pjsip/pjsip-0037-r5576-svn-backport-session-timer-crash.patch
===================================================================
--- branches/1.0/package/pjsip/pjsip-0037-r5576-svn-backport-session-timer-crash.patch (rev 0)
+++ branches/1.0/package/pjsip/pjsip-0037-r5576-svn-backport-session-timer-crash.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -0,0 +1,72 @@
+Index: pjproject/trunk/pjsip/src/pjsip-ua/sip_timer.c
+===================================================================
+--- a/pjsip/src/pjsip-ua/sip_timer.c (revision 5557)
++++ b/pjsip/src/pjsip-ua/sip_timer.c (revision 5576)
+@@ -333,6 +333,8 @@
+ pjsip_tx_data *tdata = NULL;
+ pj_status_t status;
+ pj_bool_t as_refresher;
++ int entry_id;
++ char obj_name[PJ_MAX_OBJ_NAME];
+
+ pj_assert(inv);
+
+@@ -344,7 +346,10 @@
+ /* Check our role */
+ as_refresher =
+ (inv->timer->refresher == TR_UAC && inv->timer->role == PJSIP_ROLE_UAC) ||
+- (inv->timer->refresher == TR_UAS && inv->timer->role == PJSIP_ROLE_UAS);
++ (inv->timer->refresher == TR_UAS && inv->timer->role == PJSIP_ROLE_UAS);
++
++ entry_id = entry->id;
++ pj_ansi_strncpy(obj_name, inv->pool->obj_name, PJ_MAX_OBJ_NAME);
+
+ /* Do action based on role(refresher or refreshee).
+ * As refresher:
+@@ -353,7 +358,7 @@
+ * As refreshee:
+ * - end session if there is no refresh request received.
+ */
+- if (as_refresher && (entry->id != REFRESHER_EXPIRE_TIMER_ID)) {
++ if (as_refresher && (entry_id != REFRESHER_EXPIRE_TIMER_ID)) {
+ pj_time_val now;
+
+ /* As refresher, reshedule the refresh request on the following:
+@@ -414,7 +419,7 @@
+ }
+
+ pj_gettimeofday(&now);
+- PJ_LOG(4, (inv->pool->obj_name,
++ PJ_LOG(4, (obj_name,
+ "Refreshing session after %ds (expiration period=%ds)",
+ (now.sec-inv->timer->last_refresh.sec),
+ inv->timer->setting.sess_expires));
+@@ -432,7 +437,7 @@
+ NULL, &tdata);
+
+ pj_gettimeofday(&now);
+- PJ_LOG(3, (inv->pool->obj_name,
++ PJ_LOG(3, (obj_name,
+ "No session %s received after %ds "
+ "(expiration period=%ds), stopping session now!",
+ (as_refresher?"refresh response":"refresh"),
+@@ -451,11 +456,16 @@
+ status = pjsip_inv_send_msg(inv, tdata);
+ }
+
++ /*
++ * At this point, dialog might have already been destroyed,
++ * including its pool used by the invite session.
++ */
++
+ /* Print error message, if any */
+ if (status != PJ_SUCCESS) {
+- PJ_PERROR(2, (inv->pool->obj_name, status,
++ PJ_PERROR(2, (obj_name, status,
+ "Error in %s session timer",
+- ((as_refresher && entry->id != REFRESHER_EXPIRE_TIMER_ID)?
++ ((as_refresher && entry_id != REFRESHER_EXPIRE_TIMER_ID)?
+ "refreshing" : "terminating")));
+ }
+ }
+
Added: branches/1.0/package/pjsip/pjsip-0048-r5576-svn-backport-tls-crash.patch
===================================================================
--- branches/1.0/package/pjsip/pjsip-0048-r5576-svn-backport-tls-crash.patch (rev 0)
+++ branches/1.0/package/pjsip/pjsip-0048-r5576-svn-backport-tls-crash.patch 2017-06-07 17:59:55 UTC (rev 8381)
@@ -0,0 +1,32 @@
+Index: /pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
+===================================================================
+--- a/pjlib/src/pj/ssl_sock_ossl.c (revision 5564)
++++ b/pjlib/src/pj/ssl_sock_ossl.c (revision 5565)
+@@ -145,5 +145,6 @@
+ SSL_STATE_NULL,
+ SSL_STATE_HANDSHAKING,
+- SSL_STATE_ESTABLISHED
++ SSL_STATE_ESTABLISHED,
++ SSL_STATE_ERROR
+ };
+
+@@ -1907,4 +1908,8 @@
+ buf->len += size_;
+
++ if (status != PJ_SUCCESS) {
++ ssock->ssl_state = SSL_STATE_ERROR;
++ }
++
+ ret = (*ssock->param.cb.on_data_read)(ssock, buf->data,
+ buf->len, status,
+@@ -2658,5 +2663,9 @@
+ /* Current cipher */
+ cipher = SSL_get_current_cipher(ssock->ossl_ssl);
+- info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF);
++ if (cipher) {
++ info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF);
++ } else {
++ info->cipher = PJ_TLS_UNKNOWN_CIPHER;
++ }
+
+ /* Remote address */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|