mod_s2s: Prevent traceback when replying to incoming connection to a host we don...
authorKim Alvefur <zash@zash.se>
Tue, 26 Mar 2013 08:25:20 +0000 (09:25 +0100)
committerKim Alvefur <zash@zash.se>
Tue, 26 Mar 2013 08:25:20 +0000 (09:25 +0100)
plugins/mod_s2s/mod_s2s.lua

index dc4d727d42b370916e5bdf5779092d9fe5456e54..0d552ce8ad4aa6cfa83e9bb02ec02a83af4fdd3a 100644 (file)
@@ -486,7 +486,7 @@ function session_open_stream(session, from, to)
                from = from, to = to,
        }
        local local_host = session.direction == "outgoing" and from or to;
-       if not local_host or hosts[local_host].modules.dialback then
+       if not local_host or (hosts[local_host] and hosts[local_host].modules.dialback) then
                attr["xmlns:db"] = 'jabber:server:dialback';
        end