core/s2smanager.lua

changeset 938
663f75dd7b42
parent 931
4514ed5ee943
child 959
e3db909065f2
--- a/core/s2smanager.lua	Mon Mar 30 04:39:12 2009 +0500
+++ b/core/s2smanager.lua	Mon Mar 30 05:26:10 2009 +0500
@@ -212,8 +212,8 @@
 	
 	if session.direction == "incoming" then
 		-- Send a reply stream header
-		session.to_host = nameprep(attr.to);
-		session.from_host = nameprep(attr.from);
+		session.to_host = attr.to and nameprep(attr.to);
+		session.from_host = attr.from and nameprep(attr.from);
 	
 		session.streamid = uuid_gen();
 		(session.log or log)("debug", "incoming s2s received <stream:stream>");

mercurial