Software /
code /
prosody
Changeset
2730:dea5a65b321d
Merge with 0.7
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 01 Mar 2010 18:08:52 +0000 |
parents | 2727:aab12281488f (current diff) 2729:7e0c35713bf5 (diff) |
children | 2736:27e8452cb426 |
files | |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_select.lua Mon Mar 01 16:45:49 2010 +0000 +++ b/net/server_select.lua Mon Mar 01 18:08:52 2010 +0000 @@ -435,7 +435,7 @@ local len = string_len( buffer ) if len > maxreadlen then disconnect( handler, "receive buffer exceeded" ) - handler.close( true ) + handler:close( true ) return false end local count = len * STAT_UNIT @@ -448,7 +448,7 @@ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " read error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) - _ = handler and handler.close( ) + _ = handler and handler:close( ) return false end end @@ -472,7 +472,7 @@ _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) -- delete socket from writelist _ = needtls and handler:starttls(nil, true) _writetimes[ handler ] = nil - _ = toclose and handler.close( ) + _ = toclose and handlerclose( ) return true elseif byte and ( err == "timeout" or err == "wantwrite" ) then -- want write buffer = string_sub( buffer, byte + 1, bufferlen ) -- new buffer @@ -485,7 +485,7 @@ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " write error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) - _ = handler and handler.close( ) + _ = handler and handler:close( ) return false end end
--- a/plugins/mod_proxy65.lua Mon Mar 01 16:45:49 2010 +0000 +++ b/plugins/mod_proxy65.lua Mon Mar 01 18:08:52 2010 +0000 @@ -91,12 +91,12 @@ conn:lock_read(true) else module:log("warn", "Neither data transfer nor initial connect of a participator of a transfer.") - conn.close(); + conn:close(); end else if data ~= nil then module:log("warn", "unknown connection with no authentication data -> closing it"); - conn.close(); + conn:close(); end end end @@ -107,9 +107,9 @@ if session.sha and transfers[session.sha] then local initiator, target = transfers[session.sha].initiator, transfers[session.sha].target; if initiator == conn and target ~= nil then - target.close(); + target:close(); elseif target == conn and initiator ~= nil then - initiator.close(); + initiator:close(); end transfers[session.sha] = nil; end