Changeset

597:e33d384e1b2e

stanza_dispatch = core_process_stanza, fixed for xmpp{client,server} listeners, and sessionmanager for the new syntax
author Matthew Wild <mwild1@gmail.com>
date Sun, 07 Dec 2008 19:04:23 +0000
parents 596:9fba6b040126
children 598:2538912d94ba
files core/sessionmanager.lua net/xmppclient_listener.lua net/xmppserver_listener.lua
diffstat 3 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/core/sessionmanager.lua	Sun Dec 07 18:44:23 2008 +0000
+++ b/core/sessionmanager.lua	Sun Dec 07 19:04:23 2008 +0000
@@ -69,7 +69,7 @@
 		local pres = st.presence{ type = "unavailable" };
 		if (not err) or err == "closed" then err = "connection closed"; end
 		pres:tag("status"):text("Disconnected: "..err);
-		session.stanza_dispatch(pres);
+		session:dispatch_stanza(pres);
 	end
 	
 	-- Remove session/resource from user's session list
--- a/net/xmppclient_listener.lua	Sun Dec 07 18:44:23 2008 +0000
+++ b/net/xmppclient_listener.lua	Sun Dec 07 19:04:23 2008 +0000
@@ -126,10 +126,7 @@
 		
 		session_reset_stream(session); -- Initialise, ready for use
 		
-		-- Debug version --
-		--local function handleerr(err) print("Traceback:", err, debug.traceback()); end
-		--session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr));  end
-		
+		session.stanza_dispatch = streamcallbacks.handlestanza;
 	end
 	if data then
 		session.data(conn, data);
--- a/net/xmppserver_listener.lua	Sun Dec 07 18:44:23 2008 +0000
+++ b/net/xmppserver_listener.lua	Sun Dec 07 19:04:23 2008 +0000
@@ -129,9 +129,7 @@
 		
 		session_reset_stream(session); -- Initialise, ready for use
 		
-		-- Debug version --
---		local function handleerr(err) print("Traceback:", err, debug.traceback()); end
---		session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr));  end
+		session.stanza_dispatch = streamcallbacks.handlestanza;
 	end
 	if data then
 		session.data(conn, data);