Software /
code /
prosody
Comparison
net/server_event.lua @ 2115:2d377ff72f79
net.server_event: Correct a few instances of .sslctx to ._sslctx
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Nov 2009 03:48:04 +0000 |
parent | 2114:737763dc23b0 |
child | 2116:719f95428522 |
comparison
equal
deleted
inserted
replaced
2114:737763dc23b0 | 2115:2d377ff72f79 |
---|---|
178 local _ | 178 local _ |
179 _ = self.eventread and self.eventread:close( ) -- close events; this must be called outside of the event callbacks! | 179 _ = self.eventread and self.eventread:close( ) -- close events; this must be called outside of the event callbacks! |
180 _ = self.eventwrite and self.eventwrite:close( ) | 180 _ = self.eventwrite and self.eventwrite:close( ) |
181 self.eventread, self.eventwrite = nil, nil | 181 self.eventread, self.eventwrite = nil, nil |
182 local err | 182 local err |
183 self.conn, err = ssl.wrap( self.conn, self.sslctx ) | 183 self.conn, err = ssl.wrap( self.conn, self._sslctx ) |
184 if err then | 184 if err then |
185 self.fatalerror = err | 185 self.fatalerror = err |
186 self.conn = nil -- cannot be used anymore | 186 self.conn = nil -- cannot be used anymore |
187 if "onconnect" == arg then | 187 if "onconnect" == arg then |
188 self.ondisconnect = nil -- dont call this when client isnt really connected | 188 self.ondisconnect = nil -- dont call this when client isnt really connected |
372 | 372 |
373 | 373 |
374 function interface_mt:starttls() | 374 function interface_mt:starttls() |
375 debug( "try to start ssl at client id:", self.id ) | 375 debug( "try to start ssl at client id:", self.id ) |
376 local err | 376 local err |
377 if not self.sslctx then -- no ssl available | 377 if not self._sslctx then -- no ssl available |
378 err = "no ssl context available" | 378 err = "no ssl context available" |
379 elseif self.usingssl then -- startssl was already called | 379 elseif self.usingssl then -- startssl was already called |
380 err = "ssl already active" | 380 err = "ssl already active" |
381 end | 381 end |
382 if err then | 382 if err then |