Merge pull request #471 from micmac1/pj29
pjproject: bump to version 2.9
This commit is contained in:
commit
2cf7ee50a7
16 changed files with 1508 additions and 142 deletions
|
@ -10,12 +10,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=pjproject
|
PKG_NAME:=pjproject
|
||||||
PKG_VERSION:=2.8
|
PKG_VERSION:=2.9
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://www.pjsip.org/release/$(PKG_VERSION)
|
||||||
PKG_HASH:=503d0bd7f9f13dc1492ac9b71b761b1089851fbb608b9a13996edc3c42006f79
|
PKG_HASH:=d185ef7855c8ec07191dde92f54b65a7a4b7a6f7bf8c46f7af35ceeb1da2a636
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ define Package/pjproject/Default
|
||||||
SECTION:=lib
|
SECTION:=lib
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
SUBMENU:=Telephony
|
SUBMENU:=Telephony
|
||||||
URL:=http://www.pjsip.org
|
URL:=https://www.pjsip.org
|
||||||
DEPENDS:=$(CXX_DEPENDS) +libopenssl +libuuid +libpthread
|
DEPENDS:=$(CXX_DEPENDS) +libopenssl +libuuid +libpthread
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ endef
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
$(if $(CONFIG_SOFT_FLOAT),--disable-floating-point) \
|
$(if $(CONFIG_SOFT_FLOAT),--disable-floating-point) \
|
||||||
--disable-bcg729 \
|
--disable-bcg729 \
|
||||||
|
--disable-darwin-ssl \
|
||||||
--disable-ext-sound \
|
--disable-ext-sound \
|
||||||
--disable-ffmpeg \
|
--disable-ffmpeg \
|
||||||
--disable-g711-codec \
|
--disable-g711-codec \
|
||||||
|
@ -108,7 +109,8 @@ define Build/InstallDev
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||||
$(SED) 's|$(TARGET_CFLAGS)||g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc
|
$(SED) 's|$(TARGET_CFLAGS)||g' $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc $(1)/usr/lib/pkgconfig
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpjproject.pc \
|
||||||
|
$(1)/usr/lib/pkgconfig
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call PJSIPpackage,libpj,libpj,+librt))
|
$(eval $(call PJSIPpackage,libpj,libpj,+librt))
|
||||||
|
|
|
@ -0,0 +1,157 @@
|
||||||
|
From 85b28c475b5dfd3b01dafffd1d0b3dbb6f087829 Mon Sep 17 00:00:00 2001
|
||||||
|
From: George Joseph <gjoseph@digium.com>
|
||||||
|
Date: Thu, 27 Jun 2019 11:19:47 -0600
|
||||||
|
Subject: [PATCH] ssl_sock_ossl/sip_transport_tls: Add peer to error messages
|
||||||
|
|
||||||
|
Added peer address:port to error messages in ssl_sock_ossl.
|
||||||
|
Added peer hostname to error messages in sip_transport_tls.
|
||||||
|
---
|
||||||
|
pjlib/src/pj/ssl_sock_ossl.c | 22 +++++++++++++---------
|
||||||
|
pjsip/src/pjsip/sip_transport_tls.c | 17 +++++++++--------
|
||||||
|
2 files changed, 22 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
index b4ac5c15f..42db8fdbe 100644
|
||||||
|
--- a/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
+++ b/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
@@ -210,15 +210,19 @@ static char *SSLErrorString (int err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#define ERROR_LOG(msg, err) \
|
||||||
|
- PJ_LOG(2,("SSL", "%s (%s): Level: %d err: <%lu> <%s-%s-%s> len: %d", \
|
||||||
|
+#define ERROR_LOG(msg, err, ssock) \
|
||||||
|
+{ \
|
||||||
|
+ char buf[PJ_INET6_ADDRSTRLEN+10]; \
|
||||||
|
+ PJ_LOG(2,("SSL", "%s (%s): Level: %d err: <%lu> <%s-%s-%s> len: %d peer: %s", \
|
||||||
|
msg, action, level, err, \
|
||||||
|
(ERR_lib_error_string(err)? ERR_lib_error_string(err): "???"), \
|
||||||
|
(ERR_func_error_string(err)? ERR_func_error_string(err):"???"),\
|
||||||
|
(ERR_reason_error_string(err)? \
|
||||||
|
- ERR_reason_error_string(err): "???"), len));
|
||||||
|
+ ERR_reason_error_string(err): "???"), len, \
|
||||||
|
+ pj_sockaddr_print(&ssock->rem_addr, buf, sizeof(buf), 3))); \
|
||||||
|
+}
|
||||||
|
|
||||||
|
-static void SSLLogErrors(char * action, int ret, int ssl_err, int len)
|
||||||
|
+static void SSLLogErrors(char * action, int ret, int ssl_err, int len, pj_ssl_sock_t *ssock)
|
||||||
|
{
|
||||||
|
char *ssl_err_str = SSLErrorString(ssl_err);
|
||||||
|
|
||||||
|
@@ -233,7 +237,7 @@ static void SSLLogErrors(char * action, int ret, int ssl_err, int len)
|
||||||
|
if (err2) {
|
||||||
|
int level = 0;
|
||||||
|
while (err2) {
|
||||||
|
- ERROR_LOG("SSL_ERROR_SYSCALL", err2);
|
||||||
|
+ ERROR_LOG("SSL_ERROR_SYSCALL", err2, ssock);
|
||||||
|
level++;
|
||||||
|
err2 = ERR_get_error();
|
||||||
|
}
|
||||||
|
@@ -264,7 +268,7 @@ static void SSLLogErrors(char * action, int ret, int ssl_err, int len)
|
||||||
|
int level = 0;
|
||||||
|
|
||||||
|
while (err2) {
|
||||||
|
- ERROR_LOG("SSL_ERROR_SSL", err2);
|
||||||
|
+ ERROR_LOG("SSL_ERROR_SSL", err2, ssock);
|
||||||
|
level++;
|
||||||
|
err2 = ERR_get_error();
|
||||||
|
}
|
||||||
|
@@ -302,13 +306,13 @@ static pj_status_t STATUS_FROM_SSL_ERR(char *action, pj_ssl_sock_t *ssock,
|
||||||
|
int level = 0;
|
||||||
|
int len = 0; //dummy
|
||||||
|
|
||||||
|
- ERROR_LOG("STATUS_FROM_SSL_ERR", err);
|
||||||
|
+ ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);
|
||||||
|
level++;
|
||||||
|
|
||||||
|
/* General SSL error, dig more from OpenSSL error queue */
|
||||||
|
if (err == SSL_ERROR_SSL) {
|
||||||
|
err = ERR_get_error();
|
||||||
|
- ERROR_LOG("STATUS_FROM_SSL_ERR", err);
|
||||||
|
+ ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);
|
||||||
|
}
|
||||||
|
|
||||||
|
ssock->last_err = err;
|
||||||
|
@@ -326,7 +330,7 @@ static pj_status_t STATUS_FROM_SSL_ERR2(char *action, pj_ssl_sock_t *ssock,
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dig for more from OpenSSL error queue */
|
||||||
|
- SSLLogErrors(action, ret, err, len);
|
||||||
|
+ SSLLogErrors(action, ret, err, len, ssock);
|
||||||
|
|
||||||
|
ssock->last_err = ssl_err;
|
||||||
|
return GET_STATUS_FROM_SSL_ERR(ssl_err);
|
||||||
|
diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
|
||||||
|
index 38349aa7a..d40bc7ea3 100644
|
||||||
|
--- a/pjsip/src/pjsip/sip_transport_tls.c
|
||||||
|
+++ b/pjsip/src/pjsip/sip_transport_tls.c
|
||||||
|
@@ -173,9 +173,10 @@ static void wipe_buf(pj_str_t *buf);
|
||||||
|
|
||||||
|
|
||||||
|
static void tls_perror(const char *sender, const char *title,
|
||||||
|
- pj_status_t status)
|
||||||
|
+ pj_status_t status, pj_str_t *remote_name)
|
||||||
|
{
|
||||||
|
- PJ_PERROR(3,(sender, status, "%s: [code=%d]", title, status));
|
||||||
|
+ PJ_PERROR(3,(sender, status, "%s: [code=%d]%s%.*s", title, status,
|
||||||
|
+ remote_name ? " peer: " : "", remote_name ? remote_name->slen : 0, remote_name ? remote_name->ptr : ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -730,7 +731,7 @@ PJ_DEF(pj_status_t) pjsip_tls_transport_restart(pjsip_tpfactory *factory,
|
||||||
|
status = pjsip_tls_transport_lis_start(factory, local, a_name);
|
||||||
|
if (status != PJ_SUCCESS) {
|
||||||
|
tls_perror(listener->factory.obj_name,
|
||||||
|
- "Unable to start listener after closing it", status);
|
||||||
|
+ "Unable to start listener after closing it", status, NULL);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
@@ -739,7 +740,7 @@ PJ_DEF(pj_status_t) pjsip_tls_transport_restart(pjsip_tpfactory *factory,
|
||||||
|
&listener->factory);
|
||||||
|
if (status != PJ_SUCCESS) {
|
||||||
|
tls_perror(listener->factory.obj_name,
|
||||||
|
- "Unable to register the transport listener", status);
|
||||||
|
+ "Unable to register the transport listener", status, NULL);
|
||||||
|
|
||||||
|
listener->is_registered = PJ_FALSE;
|
||||||
|
} else {
|
||||||
|
@@ -1085,7 +1086,7 @@ static pj_status_t tls_start_read(struct tls_transport *tls)
|
||||||
|
PJSIP_POOL_RDATA_LEN,
|
||||||
|
PJSIP_POOL_RDATA_INC);
|
||||||
|
if (!pool) {
|
||||||
|
- tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM);
|
||||||
|
+ tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM, NULL);
|
||||||
|
return PJ_ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1772,7 +1773,7 @@ static pj_bool_t on_connect_complete(pj_ssl_sock_t *ssock,
|
||||||
|
/* Check connect() status */
|
||||||
|
if (status != PJ_SUCCESS) {
|
||||||
|
|
||||||
|
- tls_perror(tls->base.obj_name, "TLS connect() error", status);
|
||||||
|
+ tls_perror(tls->base.obj_name, "TLS connect() error", status, &tls->remote_name);
|
||||||
|
|
||||||
|
/* Cancel all delayed transmits */
|
||||||
|
while (!pj_list_empty(&tls->delayed_list)) {
|
||||||
|
@@ -1916,7 +1917,7 @@ static pj_bool_t on_connect_complete(pj_ssl_sock_t *ssock,
|
||||||
|
pjsip_transport_dec_ref(&tls->base);
|
||||||
|
if (is_shutdown) {
|
||||||
|
status = tls->close_reason;
|
||||||
|
- tls_perror(tls->base.obj_name, "TLS connect() error", status);
|
||||||
|
+ tls_perror(tls->base.obj_name, "TLS connect() error", status, &tls->remote_name);
|
||||||
|
|
||||||
|
/* Cancel all delayed transmits */
|
||||||
|
while (!pj_list_empty(&tls->delayed_list)) {
|
||||||
|
@@ -2015,7 +2016,7 @@ static void tls_keep_alive_timer(pj_timer_heap_t *th, pj_timer_entry *e)
|
||||||
|
|
||||||
|
if (status != PJ_SUCCESS && status != PJ_EPENDING) {
|
||||||
|
tls_perror(tls->base.obj_name,
|
||||||
|
- "Error sending keep-alive packet", status);
|
||||||
|
+ "Error sending keep-alive packet", status, &tls->remote_name);
|
||||||
|
|
||||||
|
tls_init_shutdown(tls, status);
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
Index: pjsip/include/pjsip/sip_config.h
|
||||||
|
===================================================================
|
||||||
|
--- a/pjsip/include/pjsip/sip_config.h (revision 6050)
|
||||||
|
+++ b/pjsip/include/pjsip/sip_config.h (working copy)
|
||||||
|
@@ -1190,6 +1190,20 @@
|
||||||
|
# define PJSIP_AUTH_CACHED_POOL_MAX_SIZE (20 * 1024)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
+ * Specify whether the cnonce used for SIP authentication contain digits only.
|
||||||
|
+ * The "cnonce" value is setup using GUID generator, i.e:
|
||||||
|
+ * pj_create_unique_string(), and the GUID string may contain hyphen character
|
||||||
|
+ * ("-"). Some SIP servers do not like this GUID format, so this option will
|
||||||
|
+ * strip any hyphens from the GUID string.
|
||||||
|
+ *
|
||||||
|
+ * Default is 1 (cnonce will only contain digit characters).
|
||||||
|
+ */
|
||||||
|
+#ifndef PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY
|
||||||
|
+# define PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*****************************************************************************
|
||||||
|
* SIP Event framework and presence settings.
|
||||||
|
*/
|
||||||
|
Index: pjsip/src/pjsip/sip_auth_client.c
|
||||||
|
===================================================================
|
||||||
|
--- a/pjsip/src/pjsip/sip_auth_client.c (revision 6050)
|
||||||
|
+++ b/pjsip/src/pjsip/sip_auth_client.c (working copy)
|
||||||
|
@@ -396,7 +396,23 @@
|
||||||
|
|
||||||
|
/* Create cnonce */
|
||||||
|
pj_create_unique_string( cached_auth->pool, &cached_auth->cnonce );
|
||||||
|
+#if defined(PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY) && \
|
||||||
|
+ PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY!=0
|
||||||
|
+ if (pj_strchr(&cached_auth->cnonce, '-')) {
|
||||||
|
+ /* remove hyphen character. */
|
||||||
|
+ int w, r, len = pj_strlen(&cached_auth->cnonce);
|
||||||
|
+ char *s = cached_auth->cnonce.ptr;
|
||||||
|
|
||||||
|
+ w = r = 0;
|
||||||
|
+ for (; r < len; r++) {
|
||||||
|
+ if (s[r] != '-')
|
||||||
|
+ s[w++] = s[r];
|
||||||
|
+ }
|
||||||
|
+ s[w] = '\0';
|
||||||
|
+ cached_auth->cnonce.slen = w;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Initialize nonce-count */
|
||||||
|
cached_auth->nc = 1;
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
From 8d0652d4a02c7b8da58b1b98421cfda57056184d Mon Sep 17 00:00:00 2001
|
||||||
|
From: George Joseph <gjoseph@digium.com>
|
||||||
|
Date: Tue, 24 Sep 2019 06:41:16 -0600
|
||||||
|
Subject: [PATCH 30/33] Revert "Misc (re #2147): Fixed warnings in SSL socket:
|
||||||
|
redefinition of typedef 'pj_ssl_sock_t' and unused 'get_pem'."
|
||||||
|
|
||||||
|
This reverts commit 688a9b0de685328f62b2df86304b44c21e4460ae.
|
||||||
|
---
|
||||||
|
pjlib/src/pj/ssl_sock_imp_common.h | 4 ++--
|
||||||
|
pjlib/src/pj/ssl_sock_ossl.c | 5 +----
|
||||||
|
2 files changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
--- a/pjlib/src/pj/ssl_sock_imp_common.h
|
||||||
|
+++ b/pjlib/src/pj/ssl_sock_imp_common.h
|
||||||
|
@@ -93,7 +93,7 @@ typedef struct circ_buf_t {
|
||||||
|
/*
|
||||||
|
* Secure socket structure definition.
|
||||||
|
*/
|
||||||
|
-struct pj_ssl_sock_t
|
||||||
|
+typedef struct pj_ssl_sock_t
|
||||||
|
{
|
||||||
|
pj_pool_t *pool;
|
||||||
|
pj_ssl_sock_t *parent;
|
||||||
|
@@ -139,7 +139,7 @@ struct pj_ssl_sock_t
|
||||||
|
|
||||||
|
circ_buf_t circ_buf_output;
|
||||||
|
pj_lock_t *circ_buf_output_mutex;
|
||||||
|
-};
|
||||||
|
+} pj_ssl_sock_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
--- a/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
+++ b/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
|
||||||
|
(PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL)
|
||||||
|
|
||||||
|
+#include "ssl_sock_imp_common.h"
|
||||||
|
#include "ssl_sock_imp_common.c"
|
||||||
|
|
||||||
|
#define THIS_FILE "ssl_sock_ossl.c"
|
||||||
|
@@ -1579,10 +1580,6 @@ static void ssl_update_remote_cert_chain
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
- /* For now, get_pem has to be PJ_TRUE */
|
||||||
|
- pj_assert(get_pem);
|
||||||
|
- PJ_UNUSED_ARG(get_pem);
|
||||||
|
-
|
||||||
|
ci->raw_chain.cert_raw = (pj_str_t *)pj_pool_calloc(pool,
|
||||||
|
sk_X509_num(chain),
|
||||||
|
sizeof(pj_str_t));
|
|
@ -0,0 +1,79 @@
|
||||||
|
From 616a13933f33a6d74f84d85b5bfb858279a09e2d Mon Sep 17 00:00:00 2001
|
||||||
|
From: George Joseph <gjoseph@digium.com>
|
||||||
|
Date: Tue, 24 Sep 2019 06:42:04 -0600
|
||||||
|
Subject: [PATCH 31/33] Revert "Fixed #2204: Add OpenSSL remote certificate
|
||||||
|
chain info"
|
||||||
|
|
||||||
|
This reverts commit f71d60c866c4572a7c8398fe982416771fc6a7f5.
|
||||||
|
---
|
||||||
|
pjlib/src/pj/ssl_sock_ossl.c | 45 ------------------------------------
|
||||||
|
1 file changed, 45 deletions(-)
|
||||||
|
|
||||||
|
--- a/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
+++ b/pjlib/src/pj/ssl_sock_ossl.c
|
||||||
|
@@ -1570,41 +1570,6 @@ static void get_cert_info(pj_pool_t *poo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* Update remote certificates chain info. This function should be
|
||||||
|
- * called after handshake or renegotiation successfully completed.
|
||||||
|
- */
|
||||||
|
-static void ssl_update_remote_cert_chain_info(pj_pool_t *pool,
|
||||||
|
- pj_ssl_cert_info *ci,
|
||||||
|
- STACK_OF(X509) *chain,
|
||||||
|
- pj_bool_t get_pem)
|
||||||
|
-{
|
||||||
|
- int i;
|
||||||
|
-
|
||||||
|
- ci->raw_chain.cert_raw = (pj_str_t *)pj_pool_calloc(pool,
|
||||||
|
- sk_X509_num(chain),
|
||||||
|
- sizeof(pj_str_t));
|
||||||
|
- ci->raw_chain.cnt = sk_X509_num(chain);
|
||||||
|
-
|
||||||
|
- for (i = 0; i < sk_X509_num(chain); i++) {
|
||||||
|
- BIO *bio;
|
||||||
|
- BUF_MEM *ptr;
|
||||||
|
- X509 *x = sk_X509_value(chain, i);
|
||||||
|
-
|
||||||
|
- bio = BIO_new(BIO_s_mem());
|
||||||
|
-
|
||||||
|
- if (!PEM_write_bio_X509(bio, x)) {
|
||||||
|
- PJ_LOG(3, (THIS_FILE, "Error retrieving raw certificate info"));
|
||||||
|
- ci->raw_chain.cert_raw[i].ptr = NULL;
|
||||||
|
- ci->raw_chain.cert_raw[i].slen = 0;
|
||||||
|
- } else {
|
||||||
|
- BIO_write(bio, "\0", 1);
|
||||||
|
- BIO_get_mem_ptr(bio, &ptr);
|
||||||
|
- pj_strdup2(pool, &ci->raw_chain.cert_raw[i], ptr->data );
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- BIO_free(bio);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
|
||||||
|
/* Update local & remote certificates info. This function should be
|
||||||
|
* called after handshake or renegotiation successfully completed.
|
||||||
|
@@ -1613,7 +1578,6 @@ static void ssl_update_certs_info(pj_ssl
|
||||||
|
{
|
||||||
|
ossl_sock_t *ossock = (ossl_sock_t *)ssock;
|
||||||
|
X509 *x;
|
||||||
|
- STACK_OF(X509) *chain;
|
||||||
|
|
||||||
|
pj_assert(ssock->ssl_state == SSL_STATE_ESTABLISHED);
|
||||||
|
|
||||||
|
@@ -1635,15 +1599,6 @@ static void ssl_update_certs_info(pj_ssl
|
||||||
|
} else {
|
||||||
|
pj_bzero(&ssock->remote_cert_info, sizeof(pj_ssl_cert_info));
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- chain = SSL_get_peer_cert_chain(ossock->ossl_ssl);
|
||||||
|
- if (chain) {
|
||||||
|
- ssl_update_remote_cert_chain_info(ssock->pool,
|
||||||
|
- &ssock->remote_cert_info,
|
||||||
|
- chain, PJ_TRUE);
|
||||||
|
- } else {
|
||||||
|
- ssock->remote_cert_info.raw_chain.cnt = 0;
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
From 17cd744e19cd332a219a512770fa6e18453044ba Mon Sep 17 00:00:00 2001
|
||||||
|
From: George Joseph <gjoseph@digium.com>
|
||||||
|
Date: Tue, 24 Sep 2019 06:45:25 -0600
|
||||||
|
Subject: [PATCH 32/33] Revert "Re #2147 (misc): Fix failed pjsip-test
|
||||||
|
(transport_loop_test) caused by r6002."
|
||||||
|
|
||||||
|
This reverts commit 342148f5bcf3a6b0029ce834b8567c2cd691b15b.
|
||||||
|
---
|
||||||
|
pjsip/src/pjsip/sip_transport.c | 12 +++++-------
|
||||||
|
pjsip/src/pjsip/sip_transport_loop.c | 2 +-
|
||||||
|
pjsip/src/test/transport_loop_test.c | 1 -
|
||||||
|
3 files changed, 6 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c
|
||||||
|
index 65ac823d4..d63823a98 100644
|
||||||
|
--- a/pjsip/src/pjsip/sip_transport.c
|
||||||
|
+++ b/pjsip/src/pjsip/sip_transport.c
|
||||||
|
@@ -1222,13 +1222,11 @@ PJ_DEF(pj_status_t) pjsip_transport_register( pjsip_tpmgr *mgr,
|
||||||
|
|
||||||
|
pj_lock_release(mgr->lock);
|
||||||
|
|
||||||
|
- TRACE_((THIS_FILE, "Transport %s registered: type=%s, remote=%s:%d",
|
||||||
|
- tp->obj_name,
|
||||||
|
- pjsip_transport_get_type_name(tp->key.type),
|
||||||
|
- pj_sockaddr_has_addr(&tp->key.rem_addr)?
|
||||||
|
- addr_string(&tp->key.rem_addr):"",
|
||||||
|
- pj_sockaddr_has_addr(&tp->key.rem_addr)?
|
||||||
|
- pj_sockaddr_get_port(&tp->key.rem_addr):0));
|
||||||
|
+ TRACE_((THIS_FILE,"Transport %s registered: type=%s, remote=%s:%d",
|
||||||
|
+ tp->obj_name,
|
||||||
|
+ pjsip_transport_get_type_name(tp->key.type),
|
||||||
|
+ addr_string(&tp->key.rem_addr),
|
||||||
|
+ pj_sockaddr_get_port(&tp->key.rem_addr)));
|
||||||
|
|
||||||
|
return PJ_SUCCESS;
|
||||||
|
}
|
||||||
|
diff --git a/pjsip/src/pjsip/sip_transport_loop.c b/pjsip/src/pjsip/sip_transport_loop.c
|
||||||
|
index 37e20e69b..24e1a5f69 100644
|
||||||
|
--- a/pjsip/src/pjsip/sip_transport_loop.c
|
||||||
|
+++ b/pjsip/src/pjsip/sip_transport_loop.c
|
||||||
|
@@ -376,7 +376,7 @@ PJ_DEF(pj_status_t) pjsip_loop_start( pjsip_endpoint *endpt,
|
||||||
|
if (status != PJ_SUCCESS)
|
||||||
|
goto on_error;
|
||||||
|
loop->base.key.type = PJSIP_TRANSPORT_LOOP_DGRAM;
|
||||||
|
- //loop->base.key.rem_addr.addr.sa_family = pj_AF_INET();
|
||||||
|
+ loop->base.key.rem_addr.addr.sa_family = pj_AF_INET();
|
||||||
|
loop->base.type_name = "LOOP-DGRAM";
|
||||||
|
loop->base.info = "LOOP-DGRAM";
|
||||||
|
loop->base.flag = PJSIP_TRANSPORT_DATAGRAM;
|
||||||
|
diff --git a/pjsip/src/test/transport_loop_test.c b/pjsip/src/test/transport_loop_test.c
|
||||||
|
index 5f2f03904..efa2ea116 100644
|
||||||
|
--- a/pjsip/src/test/transport_loop_test.c
|
||||||
|
+++ b/pjsip/src/test/transport_loop_test.c
|
||||||
|
@@ -36,7 +36,6 @@ static int datagram_loop_test()
|
||||||
|
|
||||||
|
PJ_LOG(3,(THIS_FILE, "testing datagram loop transport"));
|
||||||
|
|
||||||
|
- pj_sockaddr_in_init(&addr, NULL, 0);
|
||||||
|
/* Test acquire transport. */
|
||||||
|
status = pjsip_endpt_acquire_transport( endpt, PJSIP_TRANSPORT_LOOP_DGRAM,
|
||||||
|
&addr, sizeof(addr), NULL, &loop);
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,35 +0,0 @@
|
||||||
From 42e5ee52e1113d24b7125e29669022c35e87693f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sauw Ming <ming@teluu.com>
|
|
||||||
Date: Wed, 26 Sep 2018 00:56:51 +0000
|
|
||||||
Subject: [PATCH] Re #2147 (misc): Fixed build error of undefined reference to
|
|
||||||
`pjmedia_srtp_enum_crypto' if PJMEDIA_HAS_SRTP is disabled.
|
|
||||||
|
|
||||||
Thanks to Alexei Gradinari for the patch
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5891 74dad513-b988-da41-8d7b-12977e46ad98
|
|
||||||
---
|
|
||||||
pjsip/src/pjsua2/endpoint.cpp | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/pjsip/src/pjsua2/endpoint.cpp
|
|
||||||
+++ b/pjsip/src/pjsua2/endpoint.cpp
|
|
||||||
@@ -2145,14 +2145,16 @@ void Endpoint::resetVideoCodecParam(cons
|
|
||||||
*/
|
|
||||||
StringVector Endpoint::srtpCryptoEnum() throw(Error)
|
|
||||||
{
|
|
||||||
+ StringVector result;
|
|
||||||
+#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
|
|
||||||
unsigned cnt = PJMEDIA_SRTP_MAX_CRYPTOS;
|
|
||||||
pjmedia_srtp_crypto cryptos[PJMEDIA_SRTP_MAX_CRYPTOS];
|
|
||||||
- StringVector result;
|
|
||||||
|
|
||||||
PJSUA2_CHECK_EXPR(pjmedia_srtp_enum_crypto(&cnt, cryptos));
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < cnt; ++i)
|
|
||||||
result.push_back(pj2Str(cryptos[i].name));
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
--- a/pjsip/src/pjsip-ua/sip_inv.c
|
|
||||||
+++ b/pjsip/src/pjsip-ua/sip_inv.c
|
|
||||||
@@ -4185,6 +4185,29 @@ static void inv_on_state_calling( pjsip_
|
|
||||||
|
|
||||||
if (tsx->status_code != 100) {
|
|
||||||
|
|
||||||
+ if (inv->role == PJSIP_ROLE_UAC) {
|
|
||||||
+ pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
|
|
||||||
+ pjsip_allow_hdr *allow = NULL;
|
|
||||||
+ pjsip_msg *msg = rdata->msg_info.msg;
|
|
||||||
+
|
|
||||||
+ if (msg) {
|
|
||||||
+ allow = (pjsip_allow_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW,
|
|
||||||
+ NULL);
|
|
||||||
+ }
|
|
||||||
+ if (allow) {
|
|
||||||
+ unsigned i;
|
|
||||||
+ const pj_str_t STR_UPDATE = { "UPDATE", 6 };
|
|
||||||
+
|
|
||||||
+ for (i=0; i<allow->count; ++i) {
|
|
||||||
+ if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0) {
|
|
||||||
+ /* UPDATE is present in Allow */
|
|
||||||
+ inv->options |= PJSIP_INV_SUPPORT_UPDATE;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (dlg->remote.info->tag.slen)
|
|
||||||
inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
From 1fed39fe1488abd654a5488b5e6ad59b4b973331 Mon Sep 17 00:00:00 2001
|
|
||||||
From: nanang <nanang@localhost>
|
|
||||||
Date: Tue, 8 Jan 2019 09:07:47 +0000
|
|
||||||
Subject: [PATCH 1/5] Fixed #2172: Avoid double reference counter decrements in
|
|
||||||
timer in the scenario of race condition between pj_timer_heap_cancel() and
|
|
||||||
pj_timer_heap_poll().
|
|
||||||
|
|
||||||
---
|
|
||||||
pjlib/src/pj/timer.c | 17 ++++++++++-------
|
|
||||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
--- a/pjlib/src/pj/timer.c
|
|
||||||
+++ b/pjlib/src/pj/timer.c
|
|
||||||
@@ -580,13 +580,16 @@ static int cancel_timer(pj_timer_heap_t
|
|
||||||
|
|
||||||
lock_timer_heap(ht);
|
|
||||||
count = cancel(ht, entry, flags | F_DONT_CALL);
|
|
||||||
- if (flags & F_SET_ID) {
|
|
||||||
- entry->id = id_val;
|
|
||||||
- }
|
|
||||||
- if (entry->_grp_lock) {
|
|
||||||
- pj_grp_lock_t *grp_lock = entry->_grp_lock;
|
|
||||||
- entry->_grp_lock = NULL;
|
|
||||||
- pj_grp_lock_dec_ref(grp_lock);
|
|
||||||
+ if (count > 0) {
|
|
||||||
+ /* Timer entry found & cancelled */
|
|
||||||
+ if (flags & F_SET_ID) {
|
|
||||||
+ entry->id = id_val;
|
|
||||||
+ }
|
|
||||||
+ if (entry->_grp_lock) {
|
|
||||||
+ pj_grp_lock_t *grp_lock = entry->_grp_lock;
|
|
||||||
+ entry->_grp_lock = NULL;
|
|
||||||
+ pj_grp_lock_dec_ref(grp_lock);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
unlock_timer_heap(ht);
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
From 9f57a5728aaec1949908bf7bbd15768fce74e315 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Nanang Izzuddin <nanang@teluu.com>
|
|
||||||
Date: Wed, 13 Feb 2019 06:51:09 +0000
|
|
||||||
Subject: [PATCH] Re #2176: Removed pop_freelist() + push_freelist() after
|
|
||||||
remove_node() as they are not only unnecessary, they cause problem.
|
|
||||||
|
|
||||||
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5934 74dad513-b988-da41-8d7b-12977e46ad98
|
|
||||||
---
|
|
||||||
pjlib/src/pj/timer.c | 5 +++--
|
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/pjlib/src/pj/timer.c
|
|
||||||
+++ b/pjlib/src/pj/timer.c
|
|
||||||
@@ -633,7 +633,8 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_
|
|
||||||
{
|
|
||||||
pj_timer_entry *node = remove_node(ht, 0);
|
|
||||||
/* Avoid re-use of this timer until the callback is done. */
|
|
||||||
- pj_timer_id_t node_timer_id = pop_freelist(ht);
|
|
||||||
+ ///Not necessary, even causes problem (see also #2176).
|
|
||||||
+ ///pj_timer_id_t node_timer_id = pop_freelist(ht);
|
|
||||||
pj_grp_lock_t *grp_lock;
|
|
||||||
|
|
||||||
++count;
|
|
||||||
@@ -653,7 +654,7 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_
|
|
||||||
|
|
||||||
lock_timer_heap(ht);
|
|
||||||
/* Now, the timer is really free for re-use. */
|
|
||||||
- push_freelist(ht, node_timer_id);
|
|
||||||
+ ///push_freelist(ht, node_timer_id);
|
|
||||||
}
|
|
||||||
if (ht->cur_size && next_delay) {
|
|
||||||
*next_delay = ht->heap[0]->_timer_value;
|
|
Loading…
Reference in a new issue