aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-23 01:38:52 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-23 01:38:52 +0100
commit5870f3b790f875d3350a5c0d423d55d06b3c67bf (patch)
treeb74aab52c254c3ba5f9ab0a01586baf1b4810d0f /net
parent5b060062b756751929382941bcc19bc4d5b3d7dc (diff)
parent194696adb0e98713037fd84c52da9e8d9238527d (diff)
downloadprosody-5870f3b790f875d3350a5c0d423d55d06b3c67bf.tar.gz
prosody-5870f3b790f875d3350a5c0d423d55d06b3c67bf.zip
Merge with 0.5
Diffstat (limited to 'net')
-rw-r--r--net/server.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/server.lua b/net/server.lua
index da65fce2..e31333e2 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -172,22 +172,24 @@ wrapserver = function( listeners, socket, ip, serverport, pattern, sslctx, maxco
local ssl = false
if sslctx then
+ ssl = true
if not ssl_newcontext then
- return nil, "luasec not found"
+ out_error "luasec not found"
+ ssl = false
end
if type( sslctx ) ~= "table" then
out_error "server.lua: wrong server sslctx"
- return nil, "wrong server sslctx"
+ ssl = false
end
sslctx, err = ssl_newcontext( sslctx )
if not sslctx then
err = err or "wrong sslctx parameters"
out_error( "server.lua: ", err )
- return nil, err
+ ssl = false
end
- ssl = true
- else
- out_put("server.lua: ", "ssl not enabled on ", serverport);
+ end
+ if not ssl then
+ out_put("server.lua: ", "ssl not enabled on ", serverport);
end
local accept = socket.accept