# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1243687778 -3600
# Node ID be8b51a8ab03627a893a5c6384fc486ace08212d
# Parent  0ff02499f05c5b3834b184127dda99a5934e380c# Parent  53555f58586f0f0d31a3761d500f900f35e4de93
Automated merge with http://waqas.ath.cx:8000/

diff -r 0ff02499f05c -r be8b51a8ab03 core/stanza_router.lua
--- 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);
diff -r 0ff02499f05c -r be8b51a8ab03 net/httpclient_listener.lua
--- 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