diff options
author | Kim Alvefur <zash@zash.se> | 2014-04-01 15:26:40 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-04-01 15:26:40 +0200 |
commit | e951f5d6f66573a19b7351dd8f0a93ecfa6c6dd2 (patch) | |
tree | cad016a5f454d0b8045d7f614acd2ec2a57bbedf | |
parent | 06d9065deaf123ded22b3f91f5fd8f052d74b00d (diff) | |
download | prosody-e951f5d6f66573a19b7351dd8f0a93ecfa6c6dd2.tar.gz prosody-e951f5d6f66573a19b7351dd8f0a93ecfa6c6dd2.zip |
net.server_{select,event}: Add compat code for supporting the same client port API on connections
-rw-r--r-- | net/server_event.lua | 1 | ||||
-rw-r--r-- | net/server_select.lua | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index e320b15c..25799640 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -367,6 +367,7 @@ do function interface_mt:ssl() return self._usingssl end + interface_mt.clientport = interface_mt.port -- COMPAT server_select function interface_mt:type() return self._type or "client" diff --git a/net/server_select.lua b/net/server_select.lua index 22887265..4bda3ef0 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -397,6 +397,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport handler.clientport = function( ) return clientport end + handler.port = handler.clientport -- COMPAT server_event local write = function( self, data ) bufferlen = bufferlen + #data if bufferlen > maxsendlen then |