From 734dfb53d3c1fab4dd3ec98e5838a6fdd2ba7c5d Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 28 Feb 2014 10:14:24 +0000 Subject: Fixed #1719: Bug in DNS SRV/RFC 3263 server selection git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4774 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/src/pjlib-util/srv_resolver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pjlib-util/src/pjlib-util/srv_resolver.c b/pjlib-util/src/pjlib-util/srv_resolver.c index 609c56e0..805863fc 100644 --- a/pjlib-util/src/pjlib-util/srv_resolver.c +++ b/pjlib-util/src/pjlib-util/srv_resolver.c @@ -254,10 +254,7 @@ static void build_server_entries(pj_dns_srv_async_query *query_job, } /* Second pass: - * pick one host among hosts with the same priority, according - * to its weight. The idea is when one server fails, client should - * contact the next server with higher priority rather than contacting - * server with the same priority as the failed one. + * Order the entry in a list. * * The algorithm for selecting server among servers with the same * priority is described in RFC 2782. @@ -298,12 +295,15 @@ static void build_server_entries(pj_dns_srv_async_query *query_job, SWAP(struct srv_target, &query_job->srv[i], &query_job->srv[j]); /* Remove all other entries (of the same priority) */ + /* Don't need to do this. + * See https://trac.pjsip.org/repos/ticket/1719 while (count > 1) { pj_array_erase(query_job->srv, sizeof(struct srv_target), query_job->srv_cnt, i+1); --count; --query_job->srv_cnt; } + */ } } -- cgit v1.2.3