From c3a47f7e0a589bf57d7909ca288742dc38cce2ae Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Sun, 12 Dec 2010 13:04:24 +0100 Subject: [PATCH] _failure_unavailable_service from fippo --- world/net/circuit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/world/net/circuit.c b/world/net/circuit.c index d8495f0..bdebbef 100644 --- a/world/net/circuit.c +++ b/world/net/circuit.c @@ -60,7 +60,6 @@ srv_choose(mixed *hostlist, string transport) { string srvhost; int srvport; - P3(("srv_choose: %O for %O\n", hostlist, ME)) unless (pointerp(hostlist)) { return connect(hostname, port, transport); } @@ -69,6 +68,12 @@ srv_choose(mixed *hostlist, string transport) { // in a load balancing way srvhost = hostlist[0][DNS_SRV_NAME]; 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); } #else