summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2014-02-28 10:14:24 +0000
committerBenny Prijono <bennylp@teluu.com>2014-02-28 10:14:24 +0000
commit734dfb53d3c1fab4dd3ec98e5838a6fdd2ba7c5d (patch)
treebd737f1d01dc81bdede9a5f8207d374b418430d1
parentbe02640037da238e49a21244ba42c11a3877fb9a (diff)
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
-rw-r--r--pjlib-util/src/pjlib-util/srv_resolver.c8
1 files 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;
}
+ */
}
}