Changeset

1235:be8b51a8ab03

Automated merge with http://waqas.ath.cx:8000/
author Matthew Wild <mwild1@gmail.com>
date Sat, 30 May 2009 13:49:38 +0100
parents 1234:0ff02499f05c (current diff) 1230:53555f58586f (diff)
children 1236:eca772495e20
files
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/core/stanza_router.lua	Sat May 30 17:48:12 2009 +0500
+++ b/core/stanza_router.lua	Sat May 30 13:49:38 2009 +0100
@@ -141,7 +141,7 @@
 
 	local event_data = {origin=origin, stanza=stanza};
 	if origin.full_jid then -- c2s connection
-		if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data); then return; end -- do preprocessing
+		if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing
 	end
 	local h = hosts[to_bare] or hosts[host or origin.host];
 	if h then
@@ -149,7 +149,7 @@
 			component_handle_stanza(origin, stanza);
 			return;
 		else
-			if h.events.fire_event(stanza.name..to_type, event_data); then return; end -- do processing
+			if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing
 		end
 	else -- non-local recipient
 		core_route_stanza(origin, stanza);
--- a/net/httpclient_listener.lua	Sat May 30 17:48:12 2009 +0500
+++ b/net/httpclient_listener.lua	Sat May 30 13:49:38 2009 +0100
@@ -1,7 +1,7 @@
+local log = require "util.logger".init("httpclient_listener");
 
 local connlisteners_register = require "net.connlisteners".register;
 
-
 local requests = {}; -- Open requests
 local buffers = {}; -- Buffers of partial lines
 
@@ -11,7 +11,7 @@
 	local request = requests[conn];
 
 	if not request then
-		print("NO REQUEST!! for "..tostring(conn));
+		log("warn", "Received response from connection %s with no request attached!", tostring(conn));
 		return;
 	end
 
@@ -29,7 +29,7 @@
 end
 
 function httpclient.register_request(conn, req)
-	print("Registering a request for "..tostring(conn));
+	log("debug", "Attaching request %s to connection %s", tostring(req.id or req), tostring(conn));
 	requests[conn] = req;
 end