Remove or comment useless prints, or change them to log()
authorMatthew Wild <mwild1@gmail.com>
Thu, 20 Nov 2008 03:00:43 +0000 (03:00 +0000)
committerMatthew Wild <mwild1@gmail.com>
Thu, 20 Nov 2008 03:00:43 +0000 (03:00 +0000)
core/s2smanager.lua
core/stanza_router.lua
util/logger.lua

index cb650cfc67cbcdb2596e02bd044b0224cae6139d..6d8f3a00b75d520992c4f8edc413c86bc4675637 100644 (file)
@@ -141,20 +141,20 @@ function streamopened(session, attr)
        
        session.version = tonumber(attr.version) or 0;
        if session.version >= 1.0 and not (attr.to and attr.from) then
-               print("to: "..tostring(attr.to).." from: "..tostring(attr.from));
+               --print("to: "..tostring(attr.to).." from: "..tostring(attr.from));
                log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC");
        end
        
        if session.direction == "incoming" then
                -- Send a reply stream header
                
-               for k,v in pairs(attr) do print("", tostring(k), ":::", tostring(v)); end
+               --for k,v in pairs(attr) do print("", tostring(k), ":::", tostring(v)); end
                
                session.to_host = attr.to;
                session.from_host = attr.from;
        
                session.streamid = uuid_gen();
-               print(session, session.from_host, "incoming s2s stream opened");
+               (session.log or log)("debug", "incoming s2s received <stream:stream>");
                send("<?xml version='1.0'?>");
                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 }):top_tag());
                if session.to_host and not hosts[session.to_host] then
index 9a638896129f70b41169c992a9c58d8ed9f81053..a3837dddf120118e79fad8e57d143ce3865d429a 100644 (file)
@@ -300,8 +300,6 @@ function core_route_stanza(origin, stanza)
        elseif origin.type == "component" or origin.type == "local" then
                -- Route via s2s for components and modules
                log("debug", "Routing outgoing stanza for %s to %s", origin.host, host);
-               for k,v in pairs(origin) do print("origin:", tostring(k), tostring(v)); end
-               print(tostring(host), tostring(from_host))
                send_s2s(origin.host, host, stanza);
        else
                log("warn", "received stanza from unhandled connection type: %s", origin.type);
index f93cafc12d2cdab559e57a1931d7a864ecddfade..e9440a04f2ee9dfba4a13ed89dd7aef2fdc343ca 100644 (file)
@@ -33,4 +33,4 @@ function init(name)
                        end
 end
 
-return _M;
\ No newline at end of file
+return _M;