Change sending reply stream header to use top_tag()

Thu, 13 Nov 2008 03:48:20 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 13 Nov 2008 03:48:20 +0000
changeset 243
09a80c8b2d73
parent 242
f15afbcbc55c
child 244
0e3bda34f958

Change sending reply stream header to use top_tag()

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Thu Nov 13 03:47:44 2008 +0000
+++ b/core/s2smanager.lua	Thu Nov 13 03:48:20 2008 +0000
@@ -133,7 +133,7 @@
 		session.streamid = uuid_gen();
 		print(session, session.from_host, "incoming s2s stream opened");
 		send("<?xml version='1.0'?>");
-		send(format("<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s'>", session.streamid, session.to_host));
+		send(stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host }));
 	elseif session.direction == "outgoing" then
 		-- If we are just using the connection for verifying dialback keys, we won't try and auth it
 		if not attr.id then error("stream response did not give us a streamid!!!"); end

mercurial