diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-03 01:11:21 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-03 01:11:21 +0100 |
commit | 67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83 (patch) | |
tree | 7aac7e2c38a5a98eb1c3d84103800a3a9e09e9d9 /net | |
parent | 29b41d9efd7e4a84f043b38cfdb51893a4504616 (diff) | |
parent | 7be3d9f227ff8083e396497507dbdfe9a6049ca8 (diff) | |
download | prosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.tar.gz prosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.zip |
Merge with 0.4
Diffstat (limited to 'net')
-rw-r--r-- | net/connlisteners.lua | 4 | ||||
-rw-r--r-- | net/server.lua | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/net/connlisteners.lua b/net/connlisteners.lua index 48101752..7aaee4c0 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -21,11 +21,11 @@ local listeners = {}; function register(name, listener) if listeners[name] and listeners[name] ~= listener then - log("warn", "Listener %s is already registered, not registering any more", name); + log("debug", "Listener %s is already registered, not registering any more", name); return false; end listeners[name] = listener; - log("info", "Registered connection listener %s", name); + log("debug", "Registered connection listener %s", name); return true; end diff --git a/net/server.lua b/net/server.lua index fd6459e8..9e42b8ff 100644 --- a/net/server.lua +++ b/net/server.lua @@ -77,6 +77,7 @@ local idfalse local addtimer
local closeall
local addserver
+local getserver
local wrapserver
local getsettings
local closesocket
@@ -670,6 +671,10 @@ addserver = function( listeners, port, addr, pattern, sslctx, maxconnections, st return handler
end
+getserver = function ( port )
+ return _server[ port ];
+end
+
removeserver = function( port )
local handler = _server[ port ]
if not handler then
@@ -728,7 +733,7 @@ stats = function( ) return _readtraffic, _sendtraffic, _readlistlen, _sendlistlen, _timerlistlen
end
-local dontstop = true;
+local dontstop = true; -- thinking about tomorrow, ...
setquitting = function (quit)
dontstop = not quit;
@@ -844,6 +849,7 @@ return { closeall = closeall,
addtimer = addtimer,
addserver = addserver,
+ getserver = getserver,
getsettings = getsettings,
setquitting = setquitting,
removeserver = removeserver,
|