Merge 0.10->trunk
[prosody.git] / plugins / mod_tls.lua
index 5ae083d49fa8bf6b39118c96ba3f18fd14b2e77f..351aaffc9708ead631446118096334067e0a2f4d 100644 (file)
@@ -108,7 +108,7 @@ end);
 -- For s2sout connections, start TLS if we can
 module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza)
        module:log("debug", "Received features element");
-       if can_do_tls(session) and stanza:child_with_ns(xmlns_starttls) then
+       if can_do_tls(session) and stanza:get_child("starttls", xmlns_starttls) then
                module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host);
                session.sends2s("<starttls xmlns='"..xmlns_starttls.."'/>");
                return true;