aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-12-07 19:04:23 +0000
committerMatthew Wild <mwild1@gmail.com>2008-12-07 19:04:23 +0000
commit1fedb0c64940adc497f12338abe1e0a60d7958c6 (patch)
tree41cd649376aa722882a1ddcf865a48f75d7c5f0d
parent34ea788ae497f82755f225973ab2238fd111ee53 (diff)
downloadprosody-1fedb0c64940adc497f12338abe1e0a60d7958c6.tar.gz
prosody-1fedb0c64940adc497f12338abe1e0a60d7958c6.zip
stanza_dispatch = core_process_stanza, fixed for xmpp{client,server} listeners, and sessionmanager for the new syntax
-rw-r--r--core/sessionmanager.lua2
-rw-r--r--net/xmppclient_listener.lua5
-rw-r--r--net/xmppserver_listener.lua4
3 files changed, 3 insertions, 8 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index a597e724..34cc9f0f 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -69,7 +69,7 @@ function destroy_session(session, err)
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
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index c2326a55..ce45ab92 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -126,10 +126,7 @@ function xmppclient.listener(conn, data)
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);
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index e4816b1e..ffc0b24b 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -129,9 +129,7 @@ function xmppserver.listener(conn, data)
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);