diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-12-04 19:21:50 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-12-04 19:21:50 +0000 |
commit | 64499bf0d8d6043fd1c2897a759d3e02c22ab9a9 (patch) | |
tree | 2d536be7a266a0dccd47e61d776e721c8d116fea /net | |
parent | ad4d4c6eeeef52ecf93a3cced0c19ef569f2f213 (diff) | |
parent | a1173c8d66cdfd8f22d34c09508a20098819bdbf (diff) | |
download | prosody-64499bf0d8d6043fd1c2897a759d3e02c22ab9a9.tar.gz prosody-64499bf0d8d6043fd1c2897a759d3e02c22ab9a9.zip |
Automated merge with http://waqas.ath.cx/
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppclient_listener.lua | 9 | ||||
-rw-r--r-- | net/xmppserver_listener.lua | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index 8ab3008c..470c23d2 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -36,7 +36,7 @@ local sm_streamopened = sessionmanager.streamopened; local sm_streamclosed = sessionmanager.streamclosed; local st = stanza; -local stream_callbacks = { streamopened = sm_streamopened, streamclosed = sm_streamclosed }; +local stream_callbacks = { streamopened = sm_streamopened, streamclosed = sm_streamclosed, handlestanza = core_process_stanza }; local sessions = {}; local xmppclient = { default_port = 5222, default_mode = "*a" }; @@ -101,7 +101,7 @@ function xmppclient.listener(conn, data) local mainlog, log = log; do - local conn_name = tostring(conn):match("[a-f0-9]+$"); + local conn_name = "c2s"..tostring(conn):match("[a-f0-9]+$"); log = logger.init(conn_name); end local print = function (...) log("info", t_concatall({...}, "\t")); end @@ -119,8 +119,9 @@ function xmppclient.listener(conn, data) -- (I'm on a mission, no time to fix now) -- 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 + --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 + end if data then session.data(conn, data); diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua index 20641998..4b41afbd 100644 --- a/net/xmppserver_listener.lua +++ b/net/xmppserver_listener.lua @@ -28,7 +28,7 @@ local s2s_streamopened = require "core.s2smanager".streamopened; local s2s_streamclosed = require "core.s2smanager".streamclosed; local s2s_destroy_session = require "core.s2smanager".destroy_session; local s2s_attempt_connect = require "core.s2smanager".attempt_connection; -local stream_callbacks = { streamopened = s2s_streamopened, streamclosed = s2s_streamclosed }; +local stream_callbacks = { streamopened = s2s_streamopened, streamclosed = s2s_streamclosed, handlestanza = core_process_stanza }; local connlisteners_register = require "net.connlisteners".register; @@ -121,8 +121,8 @@ function xmppserver.listener(conn, data) -- (I'm on a mission, no time to fix now) -- 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 +-- 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 end if data then session.data(conn, data); |