diff options
author | George Joseph <gjoseph@digium.com> | 2017-02-09 17:05:01 -0700 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-02-23 15:23:15 -0700 |
commit | 9c05ddbdddb80d46a0621b519858b37d2e7c01fb (patch) | |
tree | 1ef5ea48ee9c9c70f293bedcd0e4da14790d3af6 /third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch | |
parent | debaf377be3337cc9e3ca81a0c7b555eaa7f78ec (diff) |
pjproject_bundled: Update for pjproject 2.6
* Removed all 2.5.5 functional patches.
* Updated usages of pj_release_pool to be "safe".
* Updated configure options to disable webrtc.
* Updated config_site.h to disable webrtc in pjmedia.
* Added Richard Mudgett's recent resolver patches.
Change-Id: Ib400cc4dfca68b3d07ce14d314e829bfddc252c7
Diffstat (limited to 'third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch')
-rw-r--r-- | third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch b/third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch deleted file mode 100644 index 98c33e511..000000000 --- a/third-party/pjproject/patches/0006-r5471-svn-backport-Various-fixes-for-DNS-IPv6.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 2ab7a9f67caf73be3f2215473f72882cfaef4972 Mon Sep 17 00:00:00 2001 -From: Richard Mudgett <rmudgett@digium.com> -Date: Fri, 28 Oct 2016 12:11:30 -0500 -Subject: [PATCH 1/3] r5471 svn backport Various fixes for DNS IPv6 - -Fixed #1974: Various fixes for DNS IPv6 ---- - pjlib-util/src/pjlib-util/resolver.c | 11 +++++------ - pjlib-util/src/pjlib-util/srv_resolver.c | 17 +++++++++++++++-- - pjsip/src/pjsip/sip_resolve.c | 14 +++++++------- - 3 files changed, 27 insertions(+), 15 deletions(-) - -diff --git a/pjlib-util/src/pjlib-util/resolver.c b/pjlib-util/src/pjlib-util/resolver.c -index e5e1bed..d24ef9d 100644 ---- a/pjlib-util/src/pjlib-util/resolver.c -+++ b/pjlib-util/src/pjlib-util/resolver.c -@@ -835,7 +835,7 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver, - pj_time_val now; - struct res_key key; - struct cached_res *cache; -- pj_dns_async_query *q; -+ pj_dns_async_query *q, *p_q = NULL; - pj_uint32_t hval; - pj_status_t status = PJ_SUCCESS; - -@@ -849,9 +849,6 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver, - /* Check type */ - PJ_ASSERT_RETURN(type > 0 && type < 0xFFFF, PJ_EINVAL); - -- if (p_query) -- *p_query = NULL; -- - /* Build resource key for looking up hash tables */ - init_res_key(&key, type, name); - -@@ -970,10 +967,12 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver, - pj_hash_set_np(resolver->hquerybyres, &q->key, sizeof(q->key), - 0, q->hbufkey, q); - -- if (p_query) -- *p_query = q; -+ p_q = q; - - on_return: -+ if (p_query) -+ *p_query = p_q; -+ - pj_mutex_unlock(resolver->mutex); - return status; - } -diff --git a/pjlib-util/src/pjlib-util/srv_resolver.c b/pjlib-util/src/pjlib-util/srv_resolver.c -index 02672aa..ff9c979 100644 ---- a/pjlib-util/src/pjlib-util/srv_resolver.c -+++ b/pjlib-util/src/pjlib-util/srv_resolver.c -@@ -187,9 +187,12 @@ PJ_DEF(pj_status_t) pj_dns_srv_cancel_query(pj_dns_srv_async_query *query, - has_pending = PJ_TRUE; - } - if (srv->q_aaaa) { -- pj_dns_resolver_cancel_query(srv->q_aaaa, PJ_FALSE); -+ /* Check if it is a dummy query. */ -+ if (srv->q_aaaa != (pj_dns_async_query*)0x1) { -+ pj_dns_resolver_cancel_query(srv->q_aaaa, PJ_FALSE); -+ has_pending = PJ_TRUE; -+ } - srv->q_aaaa = NULL; -- has_pending = PJ_TRUE; - } - } - -@@ -485,12 +488,22 @@ static pj_status_t resolve_hostnames(pj_dns_srv_async_query *query_job) - srv->common.type = PJ_DNS_TYPE_A; - srv->common_aaaa.type = PJ_DNS_TYPE_AAAA; - srv->parent = query_job; -+ srv->q_a = NULL; -+ srv->q_aaaa = NULL; - - status = PJ_SUCCESS; - - /* Start DNA A record query */ - if ((query_job->option & PJ_DNS_SRV_RESOLVE_AAAA_ONLY) == 0) - { -+ if ((query_job->option & PJ_DNS_SRV_RESOLVE_AAAA) != 0) { -+ /* If there will be DNS AAAA query too, let's setup -+ * a dummy one here, otherwise app callback may be called -+ * immediately (before DNS AAAA query is sent) when -+ * DNS A record is available in the cache. -+ */ -+ srv->q_aaaa = (pj_dns_async_query*)0x1; -+ } - status = pj_dns_resolver_start_query(query_job->resolver, - &srv->target_name, - PJ_DNS_TYPE_A, 0, -diff --git a/pjsip/src/pjsip/sip_resolve.c b/pjsip/src/pjsip/sip_resolve.c -index ed326ba..3f3654d 100644 ---- a/pjsip/src/pjsip/sip_resolve.c -+++ b/pjsip/src/pjsip/sip_resolve.c -@@ -452,7 +452,7 @@ PJ_DEF(void) pjsip_resolve( pjsip_resolver_t *resolver, - } - - /* Resolve DNS AAAA record if address family is not fixed to IPv4 */ -- if (af != pj_AF_INET()) { -+ if (af != pj_AF_INET() && status == PJ_SUCCESS) { - status = pj_dns_resolver_start_query(resolver->res, - &query->naptr[0].name, - PJ_DNS_TYPE_AAAA, 0, -@@ -530,9 +530,9 @@ static void dns_a_callback(void *user_data, - - ++srv->count; - } -- -- } else { -- -+ } -+ -+ if (status != PJ_SUCCESS) { - char errmsg[PJ_ERR_MSG_SIZE]; - - /* Log error */ -@@ -593,9 +593,9 @@ static void dns_aaaa_callback(void *user_data, - - ++srv->count; - } -- -- } else { -- -+ } -+ -+ if (status != PJ_SUCCESS) { - char errmsg[PJ_ERR_MSG_SIZE]; - - /* Log error */ --- -1.7.9.5 - |