diff options
-rw-r--r-- | core/certmanager.lua | 2 | ||||
-rw-r--r-- | net/server_event.lua | 4 | ||||
-rw-r--r-- | net/server_select.lua | 2 | ||||
-rw-r--r-- | util/sasl.lua | 2 | ||||
-rw-r--r-- | util/stanza.lua | 6 |
5 files changed, 8 insertions, 8 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua index 5794ba6e..c2db63fe 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -54,7 +54,7 @@ function create_context(host, mode, config) end function reload_ssl_config() - default_ssl_config = config.get("*", "core", "ssl"); + default_ssl_config = configmanager.get("*", "core", "ssl"); end prosody.events.add_handler("config-reloaded", reload_ssl_config); diff --git a/net/server_event.lua b/net/server_event.lua index 70435f38..b767cb20 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -543,7 +543,7 @@ do local callback = function( ) interface:_close() interface.eventwritetimeout = nil - return evreturn, evtimeout + return -1; end interface.eventwritetimeout = addevent( base, nil, EV_TIMEOUT, callback, cfg.WRITE_TIMEOUT ) -- reg a new timeout event debug( "wantread during write attemp, reg it in readcallback but dont know what really happens next..." ) @@ -762,7 +762,7 @@ do local server = function( ) return nil, "this is a dummy server interface" end - local interface = wrapclient( client, ip, serverport, listeners, pattern, sslctx, startssl ) + local interface = wrapclient( client, ip, serverport, listener, pattern, sslctx, startssl ) interface:_start_connection( startssl ) debug( "new connection id:", interface.id ) return interface, err diff --git a/net/server_select.lua b/net/server_select.lua index ca8b1113..c4a1f19a 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -472,7 +472,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) -- delete socket from writelist _ = needtls and handler:starttls(nil, true) _writetimes[ handler ] = nil - _ = toclose and handlerclose( ) + _ = toclose and handler:close( ) return true elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write buffer = string_sub( buffer, byte + 1, bufferlen ) -- new buffer diff --git a/util/sasl.lua b/util/sasl.lua index 9c8fff78..2aa7fa1f 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -143,7 +143,7 @@ function method:process(message) end -- load the mechanisms -load_mechs = {"plain", "digest-md5", "anonymous", "scram"} +local load_mechs = {"plain", "digest-md5", "anonymous", "scram"} for _, mech in ipairs(load_mechs) do local name = "util.sasl."..mech; local m = require(name); diff --git a/util/stanza.lua b/util/stanza.lua index 065888d0..ad982d42 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -247,14 +247,14 @@ function deserialize(stanza) for i=1,#attr do attr[i] = nil; end local attrx = {}; for att in pairs(attr) do - if s_find(att, "|", 1, true) and not s_find(k, "\1", 1, true) then - local ns,na = s_match(k, "^([^|]+)|(.+)$"); + if s_find(att, "|", 1, true) and not s_find(att, "\1", 1, true) then + local ns,na = s_match(att, "^([^|]+)|(.+)$"); attrx[ns.."\1"..na] = attr[att]; attr[att] = nil; end end for a,v in pairs(attrx) do - attr[x] = v; + attr[a] = v; end setmetatable(stanza, stanza_mt); for _, child in ipairs(stanza) do |