Software /
code /
prosody
Comparison
net/server_event.lua @ 2477:a08ba94c2a29
net.server_event: Replace all calls to _start_ssl() to its bigger brother starttls() - fixes 5223 w/ libevent
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 21 Jan 2010 12:23:13 +0000 |
parent | 2462:2d81cc25b5a6 |
child | 2478:7be72eca5666 |
comparison
equal
deleted
inserted
replaced
2476:586147e18fcc | 2477:a08ba94c2a29 |
---|---|
141 self:ontimeout() -- call timeout listener | 141 self:ontimeout() -- call timeout listener |
142 self:_close() | 142 self:_close() |
143 debug( "new connection failed. id:", self.id, "error:", self.fatalerror ) | 143 debug( "new connection failed. id:", self.id, "error:", self.fatalerror ) |
144 else | 144 else |
145 if plainssl then -- start ssl session | 145 if plainssl then -- start ssl session |
146 self:_start_ssl( self.listener.onconnect ) | 146 self:starttls() |
147 else -- normal connection | 147 else -- normal connection |
148 self:_start_session( self.listener.onconnect ) | 148 self:_start_session( self.listener.onconnect ) |
149 end | 149 end |
150 debug( "new connection established. id:", self.id ) | 150 debug( "new connection established. id:", self.id ) |
151 end | 151 end |
660 local ip, port = client:getpeername( ) | 660 local ip, port = client:getpeername( ) |
661 interface._connections = interface._connections + 1 -- increase connection count | 661 interface._connections = interface._connections + 1 -- increase connection count |
662 local clientinterface = handleclient( client, ip, port, interface, pattern, listener, nil, sslctx ) | 662 local clientinterface = handleclient( client, ip, port, interface, pattern, listener, nil, sslctx ) |
663 --vdebug( "client id:", clientinterface, "startssl:", startssl ) | 663 --vdebug( "client id:", clientinterface, "startssl:", startssl ) |
664 if startssl then | 664 if startssl then |
665 clientinterface:_start_ssl( clientinterface.onconnect ) | 665 clientinterface:starttls() |
666 else | 666 else |
667 clientinterface:_start_session( clientinterface.onconnect ) | 667 clientinterface:_start_session( clientinterface.onconnect ) |
668 end | 668 end |
669 debug( "accepted incoming client connection from:", ip, port ) | 669 debug( "accepted incoming client connection from:", ip, port ) |
670 client, err = server:accept() -- try to accept again | 670 client, err = server:accept() -- try to accept again |