<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14413">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject: Upgrade bundled version to pjproject 2.10<br><br>This patch makes the usual necessary changes when upgrading to a new<br>version pjproject. For instance, version number bump, patches removed<br>from third-party, new *.md5 file added, etc..<br><br>This patch also includes some minor changes to Asterisk that were a result<br>of the upgrade. Specifically, there was a backward incompatibility change<br>made in 2.10 that modified the "expires header" variable field from a<br>signed to an unsigned value. This potentially effects comparison. Namely,<br>those check for a value less than zero. This patch modified a few locations<br>in the Asterisk code that may have been affected.<br><br>ASTERISK-28899 #close<br><br>Change-Id: Iec8821c6cbbc08c369d0e3cd2f14e691b41d0c81<br>---<br>M res/res_pjsip_outbound_publish.c<br>M res/res_pjsip_pubsub.c<br>M res/res_pjsip_registrar.c<br>D third-party/pjproject/patches/0010-ssl_sock_ossl-sip_transport_tls-Add-peer-to-error-me.patch<br>D third-party/pjproject/patches/0020-patch_cnonce_only_digits_option.patch<br>D third-party/pjproject/patches/0030-ssl-regression-fix.patch<br>D third-party/pjproject/patches/0031-transport-regression-fix.patch<br>D third-party/pjproject/patches/0040-ICE-Add-callback-for-finding-valid-pair.patch<br>D third-party/pjproject/patches/0040-brackets-in-via-received-params.patch<br>A third-party/pjproject/pjproject-2.10.tar.bz2.md5<br>D third-party/pjproject/pjproject-2.9.tar.bz2.md5<br>M third-party/versions.mak<br>12 files changed, 23 insertions(+), 646 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/13/14413/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c</span><br><span>index 242e43f..6c660da 100644</span><br><span>--- a/res/res_pjsip_outbound_publish.c</span><br><span>+++ b/res/res_pjsip_outbound_publish.c</span><br><span>@@ -1320,7 +1320,7 @@</span><br><span> pjsip_expires_hdr *expires;</span><br><span> </span><br><span> expires = pjsip_msg_find_hdr(param->rdata->msg_info.msg, PJSIP_H_MIN_EXPIRES, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- if (!expires || !expires->ivalue) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!expires || expires->ivalue == PJSIP_EXPIRES_NOT_SPECIFIED) {</span><br><span> DESTROY_CLIENT();</span><br><span> ast_log(LOG_ERROR, "Received 423 response on outbound publish '%s' without a Min-Expires header\n",</span><br><span> ast_sorcery_object_get_id(publish));</span><br><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index bfa3dc9..da0e89e 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -352,7 +352,7 @@</span><br><span> /*! \brief The endpoint with which the subscription is communicating */</span><br><span> struct ast_sip_endpoint *endpoint;</span><br><span> /*! \brief Expiration time of the publication */</span><br><span style="color: hsl(0, 100%, 40%);">- int expires;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expires;</span><br><span> /*! \brief Scheduled item for expiration of publication */</span><br><span> int sched_id;</span><br><span> /*! \brief The resource the publication is to */</span><br><span>@@ -676,7 +676,7 @@</span><br><span> sub_tree->persistence->cseq = dlg->local.cseq;</span><br><span> </span><br><span> if (rdata) {</span><br><span style="color: hsl(0, 100%, 40%);">- int expires;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expires;</span><br><span> pjsip_expires_hdr *expires_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL);</span><br><span> pjsip_contact_hdr *contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL);</span><br><span> </span><br><span>@@ -1525,7 +1525,7 @@</span><br><span> /*! Wrapper structure for initial_notify_task */</span><br><span> struct initial_notify_data {</span><br><span> struct sip_subscription_tree *sub_tree;</span><br><span style="color: hsl(0, 100%, 40%);">- int expires;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expires;</span><br><span> };</span><br><span> </span><br><span> static int initial_notify_task(void *obj);</span><br><span>@@ -1560,6 +1560,7 @@</span><br><span> int resp;</span><br><span> struct resource_tree tree;</span><br><span> pjsip_expires_hdr *expires_header;</span><br><span style="color: hsl(120, 100%, 40%);">+ int64_t expires;</span><br><span> </span><br><span> request_uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);</span><br><span> resource_size = pj_strlen(&request_uri->user) + 1;</span><br><span>@@ -1616,8 +1617,8 @@</span><br><span> pjsip_msg_add_hdr(rdata->msg_info.msg, (pjsip_hdr *) expires_header);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- expires_header->ivalue = (ast_tvdiff_ms(persistence->expires, ast_tvnow()) / 1000);</span><br><span style="color: hsl(0, 100%, 40%);">- if (expires_header->ivalue <= 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ expires = (ast_tvdiff_ms(persistence->expires, ast_tvnow()) / 1000);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (expires <= 0) {</span><br><span> /* The subscription expired since we started recreating the subscription. */</span><br><span> ast_debug(3, "Expired subscription retrived from persistent store '%s' %s\n",</span><br><span> persistence->endpoint, persistence->tag);</span><br><span>@@ -1625,6 +1626,7 @@</span><br><span> ao2_ref(endpoint, -1);</span><br><span> return 0;</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+ expires_header->ivalue = expires;</span><br><span> </span><br><span> memset(&tree, 0, sizeof(tree));</span><br><span> resp = build_resource_tree(endpoint, handler, resource, &tree,</span><br><span>@@ -2937,7 +2939,7 @@</span><br><span> ind->sub_tree->root->resource);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (ind->expires > -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ind->expires != PJSIP_EXPIRES_NOT_SPECIFIED) {</span><br><span> char *name = ast_alloca(strlen("->/ ") +</span><br><span> strlen(ind->sub_tree->persistence->endpoint) +</span><br><span> strlen(ind->sub_tree->root->resource) +</span><br><span>@@ -3063,7 +3065,7 @@</span><br><span> </span><br><span> ind->sub_tree = ao2_bump(sub_tree);</span><br><span> /* Since this is a normal subscribe, pjproject takes care of the timer */</span><br><span style="color: hsl(0, 100%, 40%);">- ind->expires = -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ ind->expires = PJSIP_EXPIRES_NOT_SPECIFIED;</span><br><span> </span><br><span> sub_tree->persistence = subscription_persistence_create(sub_tree);</span><br><span> subscription_persistence_update(sub_tree, rdata, SUBSCRIPTION_PERSISTENCE_CREATED);</span><br><span>@@ -3098,7 +3100,7 @@</span><br><span> }</span><br><span> </span><br><span> static enum sip_publish_type determine_sip_publish_type(pjsip_rx_data *rdata,</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip_generic_string_hdr *etag_hdr, int *expires, int *entity_id)</span><br><span style="color: hsl(120, 100%, 40%);">+ pjsip_generic_string_hdr *etag_hdr, unsigned int *expires, int *entity_id)</span><br><span> {</span><br><span> pjsip_expires_hdr *expires_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL);</span><br><span> </span><br><span>@@ -3331,7 +3333,8 @@</span><br><span> pjsip_generic_string_hdr *etag_hdr = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_sip_if_match, NULL);</span><br><span> enum sip_publish_type publish_type;</span><br><span> RAII_VAR(struct ast_sip_publication *, publication, NULL, ao2_cleanup);</span><br><span style="color: hsl(0, 100%, 40%);">- int expires = 0, entity_id, response = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expires = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int entity_id, response = 0;</span><br><span> </span><br><span> endpoint = ast_pjsip_rdata_get_endpoint(rdata);</span><br><span> ast_assert(endpoint != NULL);</span><br><span>@@ -4215,9 +4218,9 @@</span><br><span> return cli.callid;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static int cli_subscription_expiry(struct sip_subscription_tree *sub_tree)</span><br><span style="color: hsl(120, 100%, 40%);">+static unsigned int cli_subscription_expiry(struct sip_subscription_tree *sub_tree)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- int expiry;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expiry;</span><br><span> </span><br><span> expiry = sub_tree->persistence</span><br><span> ? ast_tvdiff_ms(sub_tree->persistence->expires, ast_tvnow()) / 1000</span><br><span>@@ -4263,7 +4266,7 @@</span><br><span> </span><br><span> ast_str_append(&buf, 0, "Resource: %s\n", sub_tree->root->resource);</span><br><span> ast_str_append(&buf, 0, "Event: %s\n", sub_tree->root->handler->event_name);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_str_append(&buf, 0, "Expiry: %d\n", cli_subscription_expiry(sub_tree));</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_append(&buf, 0, "Expiry: %u\n", cli_subscription_expiry(sub_tree));</span><br><span> </span><br><span> sip_subscription_to_ami(sub_tree, &buf);</span><br><span> </span><br><span>diff --git a/res/res_pjsip_registrar.c b/res/res_pjsip_registrar.c</span><br><span>index 172ecc8..0146cee 100644</span><br><span>--- a/res/res_pjsip_registrar.c</span><br><span>+++ b/res/res_pjsip_registrar.c</span><br><span>@@ -81,12 +81,12 @@</span><br><span> static int pjsip_max_url_size = PJSIP_MAX_URL_SIZE;</span><br><span> </span><br><span> /*! \brief Internal function which returns the expiration time for a contact */</span><br><span style="color: hsl(0, 100%, 40%);">-static int registrar_get_expiration(const struct ast_sip_aor *aor, const pjsip_contact_hdr *contact, const pjsip_rx_data *rdata)</span><br><span style="color: hsl(120, 100%, 40%);">+static unsigned int registrar_get_expiration(const struct ast_sip_aor *aor, const pjsip_contact_hdr *contact, const pjsip_rx_data *rdata)</span><br><span> {</span><br><span> pjsip_expires_hdr *expires;</span><br><span style="color: hsl(0, 100%, 40%);">- int expiration = aor->default_expiration;</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expiration = aor->default_expiration;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (contact && contact->expires != -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (contact && contact->expires != PJSIP_EXPIRES_NOT_SPECIFIED) {</span><br><span> /* Expiration was provided with the contact itself */</span><br><span> expiration = contact->expires;</span><br><span> } else if ((expires = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL))) {</span><br><span>@@ -148,7 +148,7 @@</span><br><span> };</span><br><span> </span><br><span> for (; (contact = (pjsip_contact_hdr *) pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, contact->next)); pj_pool_reset(pool)) {</span><br><span style="color: hsl(0, 100%, 40%);">- int expiration = registrar_get_expiration(aor, contact, rdata);</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int expiration = registrar_get_expiration(aor, contact, rdata);</span><br><span> struct ast_sip_contact *existing;</span><br><span> char contact_uri[pjsip_max_url_size];</span><br><span> </span><br><span>diff --git a/third-party/pjproject/patches/0010-ssl_sock_ossl-sip_transport_tls-Add-peer-to-error-me.patch b/third-party/pjproject/patches/0010-ssl_sock_ossl-sip_transport_tls-Add-peer-to-error-me.patch</span><br><span>deleted file mode 100644</span><br><span>index 53bde48..0000000</span><br><span>--- a/third-party/pjproject/patches/0010-ssl_sock_ossl-sip_transport_tls-Add-peer-to-error-me.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,157 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 85b28c475b5dfd3b01dafffd1d0b3dbb6f087829 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: George Joseph <gjoseph@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Thu, 27 Jun 2019 11:19:47 -0600</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH] ssl_sock_ossl/sip_transport_tls: Add peer to error messages</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-Added peer address:port to error messages in ssl_sock_ossl.</span><br><span style="color: hsl(0, 100%, 40%);">-Added peer hostname to error messages in sip_transport_tls.</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- pjlib/src/pj/ssl_sock_ossl.c | 22 +++++++++++++---------</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip/src/pjsip/sip_transport_tls.c | 17 +++++++++--------</span><br><span style="color: hsl(0, 100%, 40%);">- 2 files changed, 22 insertions(+), 17 deletions(-)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-index b4ac5c15f..42db8fdbe 100644</span><br><span>---- a/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -210,15 +210,19 @@ static char *SSLErrorString (int err)</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">--#define ERROR_LOG(msg, err) \</span><br><span style="color: hsl(0, 100%, 40%);">-- PJ_LOG(2,("SSL", "%s (%s): Level: %d err: <%lu> <%s-%s-%s> len: %d", \</span><br><span style="color: hsl(0, 100%, 40%);">-+#define ERROR_LOG(msg, err, ssock) \</span><br><span style="color: hsl(0, 100%, 40%);">-+{ \</span><br><span style="color: hsl(0, 100%, 40%);">-+ char buf[PJ_INET6_ADDRSTRLEN+10]; \</span><br><span style="color: hsl(0, 100%, 40%);">-+ PJ_LOG(2,("SSL", "%s (%s): Level: %d err: <%lu> <%s-%s-%s> len: %d peer: %s", \</span><br><span style="color: hsl(0, 100%, 40%);">- msg, action, level, err, \</span><br><span style="color: hsl(0, 100%, 40%);">- (ERR_lib_error_string(err)? ERR_lib_error_string(err): "???"), \</span><br><span style="color: hsl(0, 100%, 40%);">- (ERR_func_error_string(err)? ERR_func_error_string(err):"???"),\</span><br><span style="color: hsl(0, 100%, 40%);">- (ERR_reason_error_string(err)? \</span><br><span style="color: hsl(0, 100%, 40%);">-- ERR_reason_error_string(err): "???"), len));</span><br><span style="color: hsl(0, 100%, 40%);">-+ ERR_reason_error_string(err): "???"), len, \</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_sockaddr_print(&ssock->rem_addr, buf, sizeof(buf), 3))); \</span><br><span style="color: hsl(0, 100%, 40%);">-+}</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">--static void SSLLogErrors(char * action, int ret, int ssl_err, int len)</span><br><span style="color: hsl(0, 100%, 40%);">-+static void SSLLogErrors(char * action, int ret, int ssl_err, int len, pj_ssl_sock_t *ssock)</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- char *ssl_err_str = SSLErrorString(ssl_err);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -233,7 +237,7 @@ static void SSLLogErrors(char * action, int ret, int ssl_err, int len)</span><br><span style="color: hsl(0, 100%, 40%);">- if (err2) {</span><br><span style="color: hsl(0, 100%, 40%);">- int level = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- while (err2) {</span><br><span style="color: hsl(0, 100%, 40%);">-- ERROR_LOG("SSL_ERROR_SYSCALL", err2);</span><br><span style="color: hsl(0, 100%, 40%);">-+ ERROR_LOG("SSL_ERROR_SYSCALL", err2, ssock);</span><br><span style="color: hsl(0, 100%, 40%);">- level++;</span><br><span style="color: hsl(0, 100%, 40%);">- err2 = ERR_get_error();</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -264,7 +268,7 @@ static void SSLLogErrors(char * action, int ret, int ssl_err, int len)</span><br><span style="color: hsl(0, 100%, 40%);">- int level = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- while (err2) {</span><br><span style="color: hsl(0, 100%, 40%);">-- ERROR_LOG("SSL_ERROR_SSL", err2);</span><br><span style="color: hsl(0, 100%, 40%);">-+ ERROR_LOG("SSL_ERROR_SSL", err2, ssock);</span><br><span style="color: hsl(0, 100%, 40%);">- level++;</span><br><span style="color: hsl(0, 100%, 40%);">- err2 = ERR_get_error();</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -302,13 +306,13 @@ static pj_status_t STATUS_FROM_SSL_ERR(char *action, pj_ssl_sock_t *ssock,</span><br><span style="color: hsl(0, 100%, 40%);">- int level = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- int len = 0; //dummy</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-- ERROR_LOG("STATUS_FROM_SSL_ERR", err);</span><br><span style="color: hsl(0, 100%, 40%);">-+ ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);</span><br><span style="color: hsl(0, 100%, 40%);">- level++;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* General SSL error, dig more from OpenSSL error queue */</span><br><span style="color: hsl(0, 100%, 40%);">- if (err == SSL_ERROR_SSL) {</span><br><span style="color: hsl(0, 100%, 40%);">- err = ERR_get_error();</span><br><span style="color: hsl(0, 100%, 40%);">-- ERROR_LOG("STATUS_FROM_SSL_ERR", err);</span><br><span style="color: hsl(0, 100%, 40%);">-+ ERROR_LOG("STATUS_FROM_SSL_ERR", err, ssock);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- ssock->last_err = err;</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -326,7 +330,7 @@ static pj_status_t STATUS_FROM_SSL_ERR2(char *action, pj_ssl_sock_t *ssock,</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Dig for more from OpenSSL error queue */</span><br><span style="color: hsl(0, 100%, 40%);">-- SSLLogErrors(action, ret, err, len);</span><br><span style="color: hsl(0, 100%, 40%);">-+ SSLLogErrors(action, ret, err, len, ssock);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- ssock->last_err = ssl_err;</span><br><span style="color: hsl(0, 100%, 40%);">- return GET_STATUS_FROM_SSL_ERR(ssl_err);</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c</span><br><span style="color: hsl(0, 100%, 40%);">-index 38349aa7a..d40bc7ea3 100644</span><br><span>---- a/pjsip/src/pjsip/sip_transport_tls.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjsip/src/pjsip/sip_transport_tls.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -173,9 +173,10 @@ static void wipe_buf(pj_str_t *buf);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- static void tls_perror(const char *sender, const char *title,</span><br><span style="color: hsl(0, 100%, 40%);">-- pj_status_t status)</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_status_t status, pj_str_t *remote_name)</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">-- PJ_PERROR(3,(sender, status, "%s: [code=%d]", title, status));</span><br><span style="color: hsl(0, 100%, 40%);">-+ PJ_PERROR(3,(sender, status, "%s: [code=%d]%s%.*s", title, status,</span><br><span style="color: hsl(0, 100%, 40%);">-+ remote_name ? " peer: " : "", remote_name ? remote_name->slen : 0, remote_name ? remote_name->ptr : ""));</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -730,7 +731,7 @@ PJ_DEF(pj_status_t) pjsip_tls_transport_restart(pjsip_tpfactory *factory,</span><br><span style="color: hsl(0, 100%, 40%);">- status = pjsip_tls_transport_lis_start(factory, local, a_name);</span><br><span style="color: hsl(0, 100%, 40%);">- if (status != PJ_SUCCESS) { </span><br><span style="color: hsl(0, 100%, 40%);">- tls_perror(listener->factory.obj_name, </span><br><span style="color: hsl(0, 100%, 40%);">-- "Unable to start listener after closing it", status);</span><br><span style="color: hsl(0, 100%, 40%);">-+ "Unable to start listener after closing it", status, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- return status;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -739,7 +740,7 @@ PJ_DEF(pj_status_t) pjsip_tls_transport_restart(pjsip_tpfactory *factory,</span><br><span style="color: hsl(0, 100%, 40%);">- &listener->factory);</span><br><span style="color: hsl(0, 100%, 40%);">- if (status != PJ_SUCCESS) {</span><br><span style="color: hsl(0, 100%, 40%);">- tls_perror(listener->factory.obj_name,</span><br><span style="color: hsl(0, 100%, 40%);">-- "Unable to register the transport listener", status);</span><br><span style="color: hsl(0, 100%, 40%);">-+ "Unable to register the transport listener", status, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- listener->is_registered = PJ_FALSE; </span><br><span style="color: hsl(0, 100%, 40%);">- } else {</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1085,7 +1086,7 @@ static pj_status_t tls_start_read(struct tls_transport *tls)</span><br><span style="color: hsl(0, 100%, 40%);">- PJSIP_POOL_RDATA_LEN,</span><br><span style="color: hsl(0, 100%, 40%);">- PJSIP_POOL_RDATA_INC);</span><br><span style="color: hsl(0, 100%, 40%);">- if (!pool) {</span><br><span style="color: hsl(0, 100%, 40%);">-- tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM);</span><br><span style="color: hsl(0, 100%, 40%);">-+ tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- return PJ_ENOMEM;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1772,7 +1773,7 @@ static pj_bool_t on_connect_complete(pj_ssl_sock_t *ssock,</span><br><span style="color: hsl(0, 100%, 40%);">- /* Check connect() status */</span><br><span style="color: hsl(0, 100%, 40%);">- if (status != PJ_SUCCESS) {</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-- tls_perror(tls->base.obj_name, "TLS connect() error", status);</span><br><span style="color: hsl(0, 100%, 40%);">-+ tls_perror(tls->base.obj_name, "TLS connect() error", status, &tls->remote_name);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Cancel all delayed transmits */</span><br><span style="color: hsl(0, 100%, 40%);">- while (!pj_list_empty(&tls->delayed_list)) {</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1916,7 +1917,7 @@ static pj_bool_t on_connect_complete(pj_ssl_sock_t *ssock,</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip_transport_dec_ref(&tls->base);</span><br><span style="color: hsl(0, 100%, 40%);">- if (is_shutdown) {</span><br><span style="color: hsl(0, 100%, 40%);">- status = tls->close_reason;</span><br><span style="color: hsl(0, 100%, 40%);">-- tls_perror(tls->base.obj_name, "TLS connect() error", status);</span><br><span style="color: hsl(0, 100%, 40%);">-+ tls_perror(tls->base.obj_name, "TLS connect() error", status, &tls->remote_name);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Cancel all delayed transmits */</span><br><span style="color: hsl(0, 100%, 40%);">- while (!pj_list_empty(&tls->delayed_list)) {</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2015,7 +2016,7 @@ static void tls_keep_alive_timer(pj_timer_heap_t *th, pj_timer_entry *e)</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- if (status != PJ_SUCCESS && status != PJ_EPENDING) {</span><br><span style="color: hsl(0, 100%, 40%);">- tls_perror(tls->base.obj_name, </span><br><span style="color: hsl(0, 100%, 40%);">-- "Error sending keep-alive packet", status);</span><br><span style="color: hsl(0, 100%, 40%);">-+ "Error sending keep-alive packet", status, &tls->remote_name);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- tls_init_shutdown(tls, status);</span><br><span style="color: hsl(0, 100%, 40%);">- return;</span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.21.0</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/third-party/pjproject/patches/0020-patch_cnonce_only_digits_option.patch b/third-party/pjproject/patches/0020-patch_cnonce_only_digits_option.patch</span><br><span>deleted file mode 100644</span><br><span>index ecf6c94..0000000</span><br><span>--- a/third-party/pjproject/patches/0020-patch_cnonce_only_digits_option.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,53 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-Index: pjsip/include/pjsip/sip_config.h</span><br><span style="color: hsl(0, 100%, 40%);">-===================================================================</span><br><span>---- a/pjsip/include/pjsip/sip_config.h (revision 6050)</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjsip/include/pjsip/sip_config.h (working copy)</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1190,6 +1190,20 @@</span><br><span style="color: hsl(0, 100%, 40%);">- # define PJSIP_AUTH_CACHED_POOL_MAX_SIZE (20 * 1024)</span><br><span style="color: hsl(0, 100%, 40%);">- #endif</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">-+/**</span><br><span style="color: hsl(0, 100%, 40%);">-+ * Specify whether the cnonce used for SIP authentication contain digits only.</span><br><span style="color: hsl(0, 100%, 40%);">-+ * The "cnonce" value is setup using GUID generator, i.e:</span><br><span style="color: hsl(0, 100%, 40%);">-+ * pj_create_unique_string(), and the GUID string may contain hyphen character</span><br><span style="color: hsl(0, 100%, 40%);">-+ * ("-"). Some SIP servers do not like this GUID format, so this option will</span><br><span style="color: hsl(0, 100%, 40%);">-+ * strip any hyphens from the GUID string.</span><br><span style="color: hsl(0, 100%, 40%);">-+ *</span><br><span style="color: hsl(0, 100%, 40%);">-+ * Default is 1 (cnonce will only contain digit characters).</span><br><span style="color: hsl(0, 100%, 40%);">-+ */</span><br><span style="color: hsl(0, 100%, 40%);">-+#ifndef PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY</span><br><span style="color: hsl(0, 100%, 40%);">-+# define PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY 1</span><br><span style="color: hsl(0, 100%, 40%);">-+#endif</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">- /*****************************************************************************</span><br><span style="color: hsl(0, 100%, 40%);">- * SIP Event framework and presence settings.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-Index: pjsip/src/pjsip/sip_auth_client.c</span><br><span style="color: hsl(0, 100%, 40%);">-===================================================================</span><br><span>---- a/pjsip/src/pjsip/sip_auth_client.c (revision 6050)</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjsip/src/pjsip/sip_auth_client.c (working copy)</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -396,7 +396,23 @@</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Create cnonce */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_create_unique_string( cached_auth->pool, &cached_auth->cnonce );</span><br><span style="color: hsl(0, 100%, 40%);">-+#if defined(PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY) && \</span><br><span style="color: hsl(0, 100%, 40%);">-+ PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY!=0</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (pj_strchr(&cached_auth->cnonce, '-')) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ /* remove hyphen character. */</span><br><span style="color: hsl(0, 100%, 40%);">-+ int w, r, len = pj_strlen(&cached_auth->cnonce);</span><br><span style="color: hsl(0, 100%, 40%);">-+ char *s = cached_auth->cnonce.ptr;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+ w = r = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-+ for (; r < len; r++) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (s[r] != '-')</span><br><span style="color: hsl(0, 100%, 40%);">-+ s[w++] = s[r];</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ s[w] = '\0';</span><br><span style="color: hsl(0, 100%, 40%);">-+ cached_auth->cnonce.slen = w;</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+#endif</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">- /* Initialize nonce-count */</span><br><span style="color: hsl(0, 100%, 40%);">- cached_auth->nc = 1;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span>diff --git a/third-party/pjproject/patches/0030-ssl-regression-fix.patch b/third-party/pjproject/patches/0030-ssl-regression-fix.patch</span><br><span>deleted file mode 100644</span><br><span>index 8ddcaf7..0000000</span><br><span>--- a/third-party/pjproject/patches/0030-ssl-regression-fix.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,105 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 489281f29fc7b97143cf79154f22e5007adaba39 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: George Joseph <gjoseph@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Wed, 9 Oct 2019 07:49:44 -0600</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH 30/31] ssl regression fix</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- pjlib/src/pj/ssl_sock_gtls.c | 6 ++++--</span><br><span style="color: hsl(0, 100%, 40%);">- pjlib/src/pj/ssl_sock_imp_common.c | 4 ++++</span><br><span style="color: hsl(0, 100%, 40%);">- pjlib/src/pj/ssl_sock_imp_common.h | 3 +++</span><br><span style="color: hsl(0, 100%, 40%);">- pjlib/src/pj/ssl_sock_ossl.c | 9 +++++----</span><br><span style="color: hsl(0, 100%, 40%);">- 4 files changed, 16 insertions(+), 6 deletions(-)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjlib/src/pj/ssl_sock_gtls.c b/pjlib/src/pj/ssl_sock_gtls.c</span><br><span style="color: hsl(0, 100%, 40%);">-index 311b7b757..484770ae4 100644</span><br><span>---- a/pjlib/src/pj/ssl_sock_gtls.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjlib/src/pj/ssl_sock_gtls.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1050,7 +1050,8 @@ static void ssl_update_certs_info(pj_ssl_sock_t *ssock)</span><br><span style="color: hsl(0, 100%, 40%);">- goto us_out;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- tls_cert_get_info(ssock->pool, &ssock->local_cert_info, cert);</span><br><span style="color: hsl(0, 100%, 40%);">-- tls_cert_get_chain_raw(ssock->pool, &ssock->local_cert_info, us, 1);</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_reset(ssock->info_pool);</span><br><span style="color: hsl(0, 100%, 40%);">-+ tls_cert_get_chain_raw(ssock->info_pool, &ssock->local_cert_info, us, 1);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- us_out:</span><br><span style="color: hsl(0, 100%, 40%);">- tls_last_error = ret;</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1077,7 +1078,8 @@ us_out:</span><br><span style="color: hsl(0, 100%, 40%);">- goto peer_out;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- tls_cert_get_info(ssock->pool, &ssock->remote_cert_info, cert);</span><br><span style="color: hsl(0, 100%, 40%);">-- tls_cert_get_chain_raw(ssock->pool, &ssock->remote_cert_info, certs,</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_reset(ssock->info_pool);</span><br><span style="color: hsl(0, 100%, 40%);">-+ tls_cert_get_chain_raw(ssock->info_pool, &ssock->remote_cert_info, certs,</span><br><span style="color: hsl(0, 100%, 40%);">- certslen);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- peer_out:</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjlib/src/pj/ssl_sock_imp_common.c b/pjlib/src/pj/ssl_sock_imp_common.c</span><br><span style="color: hsl(0, 100%, 40%);">-index e6273d832..51a62a2fb 100644</span><br><span>---- a/pjlib/src/pj/ssl_sock_imp_common.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjlib/src/pj/ssl_sock_imp_common.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -616,6 +616,7 @@ static void ssl_on_destroy(void *arg)</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Secure release pool, i.e: all memory blocks will be zeroed first */</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_secure_release(&ssock->info_pool);</span><br><span style="color: hsl(0, 100%, 40%);">- pj_pool_secure_release(&ssock->pool);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1262,15 +1263,18 @@ PJ_DEF(pj_status_t) pj_ssl_sock_create (pj_pool_t *pool,</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_ssl_sock_t *ssock;</span><br><span style="color: hsl(0, 100%, 40%);">- pj_status_t status;</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_t *info_pool;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- PJ_ASSERT_RETURN(pool && param && p_ssock, PJ_EINVAL);</span><br><span style="color: hsl(0, 100%, 40%);">- PJ_ASSERT_RETURN(param->sock_type == pj_SOCK_STREAM(), PJ_ENOTSUP);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+ info_pool = pj_pool_create(pool->factory, "ssl_chain%p", 512, 512, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- pool = pj_pool_create(pool->factory, "ssl%p", 512, 512, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Create secure socket */</span><br><span style="color: hsl(0, 100%, 40%);">- ssock = ssl_alloc(pool);</span><br><span style="color: hsl(0, 100%, 40%);">- ssock->pool = pool;</span><br><span style="color: hsl(0, 100%, 40%);">-+ ssock->info_pool = info_pool;</span><br><span style="color: hsl(0, 100%, 40%);">- ssock->sock = PJ_INVALID_SOCKET;</span><br><span style="color: hsl(0, 100%, 40%);">- ssock->ssl_state = SSL_STATE_NULL;</span><br><span style="color: hsl(0, 100%, 40%);">- ssock->circ_buf_input.owner = ssock;</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjlib/src/pj/ssl_sock_imp_common.h b/pjlib/src/pj/ssl_sock_imp_common.h</span><br><span style="color: hsl(0, 100%, 40%);">-index 09f259ef7..eb45f14e0 100644</span><br><span>---- a/pjlib/src/pj/ssl_sock_imp_common.h</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjlib/src/pj/ssl_sock_imp_common.h</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -96,6 +96,9 @@ typedef struct circ_buf_t {</span><br><span style="color: hsl(0, 100%, 40%);">- struct pj_ssl_sock_t</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_pool_t *pool;</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_t *info_pool; /* this is for certificate chain </span><br><span style="color: hsl(0, 100%, 40%);">-+ * information allocation. Don't use for </span><br><span style="color: hsl(0, 100%, 40%);">-+ * other purposes. */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_ssl_sock_t *parent;</span><br><span style="color: hsl(0, 100%, 40%);">- pj_ssl_sock_param param;</span><br><span style="color: hsl(0, 100%, 40%);">- pj_ssl_sock_param newsock_param;</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-index b4ac5c15f..2545b7c37 100644</span><br><span>---- a/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjlib/src/pj/ssl_sock_ossl.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1637,11 +1637,12 @@ static void ssl_update_certs_info(pj_ssl_sock_t *ssock)</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- chain = SSL_get_peer_cert_chain(ossock->ossl_ssl);</span><br><span style="color: hsl(0, 100%, 40%);">- if (chain) {</span><br><span style="color: hsl(0, 100%, 40%);">-- ssl_update_remote_cert_chain_info(ssock->pool,</span><br><span style="color: hsl(0, 100%, 40%);">-- &ssock->remote_cert_info,</span><br><span style="color: hsl(0, 100%, 40%);">-- chain, PJ_TRUE);</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_pool_reset(ssock->info_pool);</span><br><span style="color: hsl(0, 100%, 40%);">-+ ssl_update_remote_cert_chain_info(ssock->info_pool,</span><br><span style="color: hsl(0, 100%, 40%);">-+ &ssock->remote_cert_info,</span><br><span style="color: hsl(0, 100%, 40%);">-+ chain, PJ_TRUE);</span><br><span style="color: hsl(0, 100%, 40%);">- } else {</span><br><span style="color: hsl(0, 100%, 40%);">-- ssock->remote_cert_info.raw_chain.cnt = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-+ ssock->remote_cert_info.raw_chain.cnt = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.21.0</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/third-party/pjproject/patches/0031-transport-regression-fix.patch b/third-party/pjproject/patches/0031-transport-regression-fix.patch</span><br><span>deleted file mode 100644</span><br><span>index fdd8836..0000000</span><br><span>--- a/third-party/pjproject/patches/0031-transport-regression-fix.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,187 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 9c6108ca392d5e0392e7fb5d2ffde85e3c44ce55 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: George Joseph <gjoseph@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Wed, 9 Oct 2019 07:50:32 -0600</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH 31/31] transport regression fix</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip/src/pjsip/sip_transport.c | 73 +++++++++++++++++++++++++++------</span><br><span style="color: hsl(0, 100%, 40%);">- 1 file changed, 61 insertions(+), 12 deletions(-)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjsip/src/pjsip/sip_transport.c b/pjsip/src/pjsip/sip_transport.c</span><br><span style="color: hsl(0, 100%, 40%);">-index 65ac823d4..da6b70e50 100644</span><br><span>---- a/pjsip/src/pjsip/sip_transport.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjsip/src/pjsip/sip_transport.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -50,6 +50,24 @@ static const char *addr_string(const pj_sockaddr_t *addr)</span><br><span style="color: hsl(0, 100%, 40%);">- str, sizeof(str));</span><br><span style="color: hsl(0, 100%, 40%);">- return str;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-+static const char* print_tpsel_info(const pjsip_tpselector *sel)</span><br><span style="color: hsl(0, 100%, 40%);">-+{</span><br><span style="color: hsl(0, 100%, 40%);">-+ static char tpsel_info_buf[80];</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (!sel) return "(null)";</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (sel->type==PJSIP_TPSELECTOR_LISTENER)</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_ansi_snprintf(tpsel_info_buf, sizeof(tpsel_info_buf),</span><br><span style="color: hsl(0, 100%, 40%);">-+ "listener[%s], reuse=%d", sel->u.listener->obj_name,</span><br><span style="color: hsl(0, 100%, 40%);">-+ !sel->disable_connection_reuse);</span><br><span style="color: hsl(0, 100%, 40%);">-+ else if (sel->type==PJSIP_TPSELECTOR_TRANSPORT)</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_ansi_snprintf(tpsel_info_buf, sizeof(tpsel_info_buf),</span><br><span style="color: hsl(0, 100%, 40%);">-+ "transport[%s], reuse=%d", sel->u.transport->info,</span><br><span style="color: hsl(0, 100%, 40%);">-+ !sel->disable_connection_reuse);</span><br><span style="color: hsl(0, 100%, 40%);">-+ else</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_ansi_snprintf(tpsel_info_buf, sizeof(tpsel_info_buf),</span><br><span style="color: hsl(0, 100%, 40%);">-+ "unknown[%p], reuse=%d", sel->u.ptr,</span><br><span style="color: hsl(0, 100%, 40%);">-+ !sel->disable_connection_reuse);</span><br><span style="color: hsl(0, 100%, 40%);">-+ return tpsel_info_buf;</span><br><span style="color: hsl(0, 100%, 40%);">-+}</span><br><span style="color: hsl(0, 100%, 40%);">- #else</span><br><span style="color: hsl(0, 100%, 40%);">- # define TRACE_(x)</span><br><span style="color: hsl(0, 100%, 40%);">- #endif</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1210,10 +1228,14 @@ PJ_DEF(pj_status_t) pjsip_transport_register( pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- * new transport to the list.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_list_push_back(tp_ref, tp_add);</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Remote address already registered, "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "appended the transport to the list"));</span><br><span style="color: hsl(0, 100%, 40%);">- } else {</span><br><span style="color: hsl(0, 100%, 40%);">- /* Transport list not found, add it to the hash table. */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_hash_set_np(mgr->table, &tp->key, key_len, hval, tp_add->tp_buf,</span><br><span style="color: hsl(0, 100%, 40%);">- tp_add);</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Remote address not registered, "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "added the transport to the hash"));</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Add ref transport group lock, if any */</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1283,6 +1305,13 @@ static pj_status_t destroy_transport( pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- /* The transport list has multiple entry. */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_hash_set_np(mgr->table, &tp_next->tp->key, key_len,</span><br><span style="color: hsl(0, 100%, 40%);">- hval, tp_next->tp_buf, tp_next);</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Hash entry updated after "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "transport %d being destroyed",</span><br><span style="color: hsl(0, 100%, 40%);">-+ tp->obj_name));</span><br><span style="color: hsl(0, 100%, 40%);">-+ } else {</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Hash entry deleted after "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "transport %d being destroyed",</span><br><span style="color: hsl(0, 100%, 40%);">-+ tp->obj_name));</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1294,6 +1323,14 @@ static pj_status_t destroy_transport( pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- tp_iter = tp_iter->next;</span><br><span style="color: hsl(0, 100%, 40%);">- } while (tp_iter != tp_ref);</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (tp_iter->tp != tp) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ PJ_LOG(3, (THIS_FILE, "Warning: transport %s being destroyed is "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "not registered", tp->obj_name));</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ } else {</span><br><span style="color: hsl(0, 100%, 40%);">-+ PJ_LOG(3, (THIS_FILE, "Warning: transport %s being destroyed is "</span><br><span style="color: hsl(0, 100%, 40%);">-+ "not found in the hash table", tp->obj_name));</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- pj_lock_release(mgr->lock);</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2159,6 +2196,7 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- NULL, tp);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">- /*</span><br><span style="color: hsl(0, 100%, 40%);">- * pjsip_tpmgr_acquire_transport2()</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2176,8 +2214,9 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip_tpfactory *factory;</span><br><span style="color: hsl(0, 100%, 40%);">- pj_status_t status;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-- TRACE_((THIS_FILE,"Acquiring transport type=%s, remote=%s:%d",</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE,"Acquiring transport type=%s, sel=%s remote=%s:%d",</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip_transport_get_type_name(type),</span><br><span style="color: hsl(0, 100%, 40%);">-+ print_tpsel_info(sel),</span><br><span style="color: hsl(0, 100%, 40%);">- addr_string(remote),</span><br><span style="color: hsl(0, 100%, 40%);">- pj_sockaddr_get_port(remote)));</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2194,6 +2233,7 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- /* See if the transport is (not) suitable */</span><br><span style="color: hsl(0, 100%, 40%);">- if (seltp->key.type != type) {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_lock_release(mgr->lock);</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Transport type in tpsel not matched"));</span><br><span style="color: hsl(0, 100%, 40%);">- return PJSIP_ETPNOTSUITABLE;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2234,6 +2274,7 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- if (sel->u.listener->type != type) {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_lock_release(mgr->lock);</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Listener type in tpsel not matched"));</span><br><span style="color: hsl(0, 100%, 40%);">- return PJSIP_ETPNOTSUITABLE;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2249,21 +2290,25 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- tp_entry = (transport *)pj_hash_get(mgr->table, &key, key_len,</span><br><span style="color: hsl(0, 100%, 40%);">- NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- if (tp_entry) {</span><br><span style="color: hsl(0, 100%, 40%);">-- if (sel && sel->type == PJSIP_TPSELECTOR_LISTENER) {</span><br><span style="color: hsl(0, 100%, 40%);">-- transport *tp_iter = tp_entry;</span><br><span style="color: hsl(0, 100%, 40%);">-- do {</span><br><span style="color: hsl(0, 100%, 40%);">-+ transport *tp_iter = tp_entry;</span><br><span style="color: hsl(0, 100%, 40%);">-+ do {</span><br><span style="color: hsl(0, 100%, 40%);">-+ /* Don't use transport being shutdown */</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (!tp_iter->tp->is_shutdown) {</span><br><span style="color: hsl(0, 100%, 40%);">- if (sel && sel->type == PJSIP_TPSELECTOR_LISTENER &&</span><br><span style="color: hsl(0, 100%, 40%);">-- sel->u.listener &&</span><br><span style="color: hsl(0, 100%, 40%);">-- tp_iter->tp->factory == sel->u.listener)</span><br><span style="color: hsl(0, 100%, 40%);">-+ sel->u.listener)</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">-+ /* Match listener if selector is set */</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (tp_iter->tp->factory == sel->u.listener) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ tp_ref = tp_iter->tp;</span><br><span style="color: hsl(0, 100%, 40%);">-+ break;</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ } else {</span><br><span style="color: hsl(0, 100%, 40%);">- tp_ref = tp_iter->tp;</span><br><span style="color: hsl(0, 100%, 40%);">- break;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-- tp_iter = tp_iter->next;</span><br><span style="color: hsl(0, 100%, 40%);">-- } while (tp_iter != tp_entry);</span><br><span style="color: hsl(0, 100%, 40%);">-- } else {</span><br><span style="color: hsl(0, 100%, 40%);">-- tp_ref = tp_entry->tp;</span><br><span style="color: hsl(0, 100%, 40%);">-- }</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ tp_iter = tp_iter->next;</span><br><span style="color: hsl(0, 100%, 40%);">-+ } while (tp_iter != tp_entry);</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2276,7 +2321,7 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Ignore address for loop transports. */</span><br><span style="color: hsl(0, 100%, 40%);">- if (type == PJSIP_TRANSPORT_LOOP ||</span><br><span style="color: hsl(0, 100%, 40%);">-- type == PJSIP_TRANSPORT_LOOP_DGRAM)</span><br><span style="color: hsl(0, 100%, 40%);">-+ type == PJSIP_TRANSPORT_LOOP_DGRAM)</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_sockaddr *addr = &key.rem_addr;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2315,6 +2360,7 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- * 'duplicate' of the existing transport (same type & remote addr,</span><br><span style="color: hsl(0, 100%, 40%);">- * but different factory).</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-+ TRACE_((THIS_FILE, "Transport found but from different listener"));</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- if (tp_ref!=NULL && !tp_ref->is_shutdown) {</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -2347,10 +2393,13 @@ PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport2(pjsip_tpmgr *mgr,</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Verify that the listener type matches the destination type */</span><br><span style="color: hsl(0, 100%, 40%);">-+ /* Already checked above. */</span><br><span style="color: hsl(0, 100%, 40%);">-+ /*</span><br><span style="color: hsl(0, 100%, 40%);">- if (sel->u.listener->type != type) {</span><br><span style="color: hsl(0, 100%, 40%);">- pj_lock_release(mgr->lock);</span><br><span style="color: hsl(0, 100%, 40%);">- return PJSIP_ETPNOTSUITABLE;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-+ */</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* We'll use this listener to create transport */</span><br><span style="color: hsl(0, 100%, 40%);">- factory = sel->u.listener;</span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.21.0</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/third-party/pjproject/patches/0040-ICE-Add-callback-for-finding-valid-pair.patch b/third-party/pjproject/patches/0040-ICE-Add-callback-for-finding-valid-pair.patch</span><br><span>deleted file mode 100644</span><br><span>index 062e75e..0000000</span><br><span>--- a/third-party/pjproject/patches/0040-ICE-Add-callback-for-finding-valid-pair.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,84 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 8b8199180766e3eab6014feaa64ccaedcdc12816 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: Ben Ford <bford@digium.com></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Mon, 23 Dec 2019 11:11:13 -0600</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH] ICE: Add callback for finding valid pair.</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-It's possible to start sending as soon as one valid pair is found during</span><br><span style="color: hsl(0, 100%, 40%);">-ICE negotiation. The reason we would want to do this is because it is</span><br><span style="color: hsl(0, 100%, 40%);">-possible for a delay to occur at the start of a call for up to 3 seconds</span><br><span style="color: hsl(0, 100%, 40%);">-until ICE negotiation has actually completed. More information can be</span><br><span style="color: hsl(0, 100%, 40%);">-found here:</span><br><span style="color: hsl(0, 100%, 40%);">-https://bugs.chromium.org/p/chromium/issues/detail?id=1024096</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-This patch adds a callback once a valid pair is found that applications</span><br><span style="color: hsl(0, 100%, 40%);">-can use to start sending to avoid this scenario. Since only one valid</span><br><span style="color: hsl(0, 100%, 40%);">-pair is needed to start media, we only trigger the callback once.</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- pjnath/include/pjnath/ice_session.h | 9 +++++++++</span><br><span style="color: hsl(0, 100%, 40%);">- pjnath/src/pjnath/ice_session.c | 16 ++++++++++++++++</span><br><span style="color: hsl(0, 100%, 40%);">- 2 files changed, 25 insertions(+)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjnath/include/pjnath/ice_session.h b/pjnath/include/pjnath/ice_session.h</span><br><span style="color: hsl(0, 100%, 40%);">-index 15f0d04..8971220 100644</span><br><span>---- a/pjnath/include/pjnath/ice_session.h</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjnath/include/pjnath/ice_session.h</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -468,6 +468,14 @@ typedef struct pj_ice_sess_cb</span><br><span style="color: hsl(0, 100%, 40%);">- {</span><br><span style="color: hsl(0, 100%, 40%);">- /**</span><br><span style="color: hsl(0, 100%, 40%);">- * An optional callback that will be called by the ICE session when</span><br><span style="color: hsl(0, 100%, 40%);">-+ * a valid pair has been found during ICE negotiation.</span><br><span style="color: hsl(0, 100%, 40%);">-+ *</span><br><span style="color: hsl(0, 100%, 40%);">-+ * @param ice The ICE session.</span><br><span style="color: hsl(0, 100%, 40%);">-+ */</span><br><span style="color: hsl(0, 100%, 40%);">-+ void (*on_valid_pair)(pj_ice_sess *ice);</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">-+ /**</span><br><span style="color: hsl(0, 100%, 40%);">-+ * An optional callback that will be called by the ICE session when</span><br><span style="color: hsl(0, 100%, 40%);">- * ICE negotiation has completed, successfully or with failure.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * @param ice The ICE session.</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -625,6 +633,7 @@ struct pj_ice_sess</span><br><span style="color: hsl(0, 100%, 40%);">- pj_bool_t is_nominating; /**< Nominating stage */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_bool_t is_complete; /**< Complete? */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_bool_t is_destroying; /**< Destroy is called */</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_bool_t valid_pair_found; /**< First pair found */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_status_t ice_status; /**< Error status. */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_timer_entry timer; /**< ICE timer. */</span><br><span style="color: hsl(0, 100%, 40%);">- pj_ice_sess_cb cb; /**< Callback. */</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c</span><br><span style="color: hsl(0, 100%, 40%);">-index c51dba7..ed4138a 100644</span><br><span>---- a/pjnath/src/pjnath/ice_session.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjnath/src/pjnath/ice_session.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -418,6 +418,8 @@ PJ_DEF(pj_status_t) pj_ice_sess_create(pj_stun_config *stun_cfg,</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- pj_list_init(&ice->early_check);</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+ ice->valid_pair_found = PJ_FALSE;</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">- /* Done */</span><br><span style="color: hsl(0, 100%, 40%);">- *p_ice = ice;</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-@@ -1348,6 +1350,20 @@ static pj_bool_t on_check_complete(pj_ice_sess *ice,</span><br><span style="color: hsl(0, 100%, 40%);">- GET_CHECK_ID(&ice->clist, check),</span><br><span style="color: hsl(0, 100%, 40%);">- (check->nominated ? " and nominated" : "")));</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-+ {</span><br><span style="color: hsl(0, 100%, 40%);">-+ /* On the first valid pair, we call the callback, if present */</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (ice->valid_pair_found == PJ_FALSE) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ void (*on_valid_pair)(pj_ice_sess *ice);</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">-+ ice->valid_pair_found = PJ_TRUE;</span><br><span style="color: hsl(0, 100%, 40%);">-+ on_valid_pair = ice->cb.on_valid_pair;</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">-+ if (on_valid_pair) {</span><br><span style="color: hsl(0, 100%, 40%);">-+ (*on_valid_pair)(ice);</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+ }</span><br><span style="color: hsl(0, 100%, 40%);">-+</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* 8.2. Updating States</span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.7.4</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch b/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch</span><br><span>deleted file mode 100644</span><br><span>index bf96d3d..0000000</span><br><span>--- a/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,40 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 6324760c2fb0ffeb2e29c6c0a96a33906caa8d5f Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: Sean Bright <sean.bright@gmail.com></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Thu, 16 Jan 2020 10:46:11 -0500</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH] sip_parser.c: Allow brackets in via parameters</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-From RFC 5118 section 4.5:</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- While it would be beneficial if the same non-terminal</span><br><span style="color: hsl(0, 100%, 40%);">- ("IPv6reference") was used for both the "sent-by" and "via-received"</span><br><span style="color: hsl(0, 100%, 40%);">- production rules, there has not been a consensus in the working group</span><br><span style="color: hsl(0, 100%, 40%);">- to that effect. Thus, the best that can be suggested is that</span><br><span style="color: hsl(0, 100%, 40%);">- implementations must follow the Robustness Principle [RFC1122] and be</span><br><span style="color: hsl(0, 100%, 40%);">- liberal in accepting a "received" parameter with or without the</span><br><span style="color: hsl(0, 100%, 40%);">- delimiting "[" and "]" tokens. When sending a request,</span><br><span style="color: hsl(0, 100%, 40%);">- implementations must not put the delimiting "[" and "]" tokens.</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- pjsip/src/pjsip/sip_parser.c | 4 ++--</span><br><span style="color: hsl(0, 100%, 40%);">- 1 file changed, 2 insertions(+), 2 deletions(-)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c</span><br><span style="color: hsl(0, 100%, 40%);">-index e01e672fb..4f9c7fca4 100644</span><br><span>---- a/pjsip/src/pjsip/sip_parser.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/pjsip/src/pjsip/sip_parser.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -384,11 +384,11 @@ static pj_status_t init_parser()</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC, &pconst.pjsip_TOKEN_SPEC);</span><br><span style="color: hsl(0, 100%, 40%);">- PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span style="color: hsl(0, 100%, 40%);">-- pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, ":");</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, "[:]");</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC_ESC, &pconst.pjsip_TOKEN_SPEC_ESC);</span><br><span style="color: hsl(0, 100%, 40%);">- PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span style="color: hsl(0, 100%, 40%);">-- pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, ":");</span><br><span style="color: hsl(0, 100%, 40%);">-+ pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, "[:]");</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- status = pj_cis_dup(&pconst.pjsip_HOST_SPEC, &pconst.pjsip_ALNUM_SPEC);</span><br><span style="color: hsl(0, 100%, 40%);">- PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.20.1</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>diff --git a/third-party/pjproject/pjproject-2.10.tar.bz2.md5 b/third-party/pjproject/pjproject-2.10.tar.bz2.md5</span><br><span>new file mode 100644</span><br><span>index 0000000..57261b4</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/pjproject-2.10.tar.bz2.md5</span><br><span>@@ -0,0 +1,2 @@</span><br><span style="color: hsl(120, 100%, 40%);">+5d0202f79a7aeb14873c45b0e4c14a70 *pjproject-2.10.zip</span><br><span style="color: hsl(120, 100%, 40%);">+4fffc49b461133f0a4143b05a22fb30e pjproject-2.10.tar.bz2</span><br><span>diff --git a/third-party/pjproject/pjproject-2.9.tar.bz2.md5 b/third-party/pjproject/pjproject-2.9.tar.bz2.md5</span><br><span>deleted file mode 100644</span><br><span>index 5e11195..0000000</span><br><span>--- a/third-party/pjproject/pjproject-2.9.tar.bz2.md5</span><br><span>+++ /dev/null</span><br><span>@@ -1,2 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-e4ec23a6bfa06fb53c313aa7fed81236 *pjproject-2.9.zip</span><br><span style="color: hsl(0, 100%, 40%);">-66757078e7bd7cf316acb0425c2fdd6f pjproject-2.9.tar.bz2</span><br><span>\ No newline at end of file</span><br><span>diff --git a/third-party/versions.mak b/third-party/versions.mak</span><br><span>index 103ac58..fae41c6 100644</span><br><span>--- a/third-party/versions.mak</span><br><span>+++ b/third-party/versions.mak</span><br><span>@@ -1,2 +1,2 @@</span><br><span> JANSSON_VERSION = 2.12</span><br><span style="color: hsl(0, 100%, 40%);">-PJPROJECT_VERSION = 2.9</span><br><span style="color: hsl(120, 100%, 40%);">+PJPROJECT_VERSION = 2.10</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14413">change 14413</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14413"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Iec8821c6cbbc08c369d0e3cd2f14e691b41d0c81 </div>
<div style="display:none"> Gerrit-Change-Number: 14413 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>