mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
_failure_unavailable_service from fippo
This commit is contained in:
parent
f4e0f14b19
commit
c3a47f7e0a
1 changed files with 6 additions and 1 deletions
|
@ -60,7 +60,6 @@ srv_choose(mixed *hostlist, string transport) {
|
||||||
string srvhost;
|
string srvhost;
|
||||||
int srvport;
|
int srvport;
|
||||||
|
|
||||||
P3(("srv_choose: %O for %O\n", hostlist, ME))
|
|
||||||
unless (pointerp(hostlist)) {
|
unless (pointerp(hostlist)) {
|
||||||
return connect(hostname, port, transport);
|
return connect(hostname, port, transport);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +68,12 @@ srv_choose(mixed *hostlist, string transport) {
|
||||||
// in a load balancing way
|
// in a load balancing way
|
||||||
srvhost = hostlist[0][DNS_SRV_NAME];
|
srvhost = hostlist[0][DNS_SRV_NAME];
|
||||||
srvport = hostlist[0][DNS_SRV_PORT];
|
srvport = hostlist[0][DNS_SRV_PORT];
|
||||||
|
if (srvhost == "") {
|
||||||
|
// no such service offered at this domain
|
||||||
|
// _xmpp-server._tcp.no.such.xmpptest.com. 1195 IN SRV 0 0 0 .
|
||||||
|
return connect_failure("_failure_unavailable_service",
|
||||||
|
"No service offered by domain " + hostname);
|
||||||
|
}
|
||||||
return connect(srvhost, srvport, transport);
|
return connect(srvhost, srvport, transport);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue