diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-03-02 05:15:54 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-03-02 05:15:54 +0500 |
commit | eee6ab461695470add36aa9d1e383eadf4c8054d (patch) | |
tree | 397f7f3f8691fc18674914123a2e1e39da7647a1 | |
parent | 2c29bb6f6ac3db2cf94aca7cd827a586db2ad497 (diff) | |
parent | 5ef073957a08aeb1874b0900d1e4fd603b2a1513 (diff) | |
download | prosody-eee6ab461695470add36aa9d1e383eadf4c8054d.tar.gz prosody-eee6ab461695470add36aa9d1e383eadf4c8054d.zip |
Merge 0.8->trunk.
-rw-r--r-- | net/connlisteners.lua | 8 | ||||
-rwxr-xr-x | prosody | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua index e13f85de..7da25c62 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -13,8 +13,10 @@ local server = require "net.server"; local log = require "util.logger".init("connlisteners"); local tostring = tostring; -local dofile, pcall, error = - dofile, pcall, error +local dofile, xpcall, error = + dofile, xpcall, error + +local debug_traceback = debug.traceback; module "connlisteners" @@ -37,7 +39,7 @@ end function get(name) local h = listeners[name]; if not h then - local ok, ret = pcall(dofile, listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua"); + local ok, ret = xpcall(function() dofile(listeners_dir..name:gsub("[^%w%-]", "_").."_listener.lua") end, debug_traceback); if not ok then log("error", "Error while loading listener '%s': %s", tostring(name), tostring(ret)); return nil, ret; @@ -345,6 +345,7 @@ function load_secondary_libraries() ]] require "net.connlisteners"; + require "net.httpserver"; require "util.stanza" require "util.jid" |