Mercurial > prosody-hg
comparison core/s2smanager.lua @ 2813:46dfcc33ea9e
s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 19 Feb 2010 03:30:27 +0000 |
| parents | 0323bdb1fcfa |
| children | 1edeb8fe7d14 |
comparison
equal
deleted
inserted
replaced
| 2812:496a80322a51 | 2813:46dfcc33ea9e |
|---|---|
| 301 | 301 |
| 302 return true; | 302 return true; |
| 303 end | 303 end |
| 304 | 304 |
| 305 function make_connect(host_session, connect_host, connect_port) | 305 function make_connect(host_session, connect_host, connect_port) |
| 306 host_session.log("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port); | 306 (host_session.log or log)("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port); |
| 307 -- Ok, we're going to try to connect | 307 -- Ok, we're going to try to connect |
| 308 | 308 |
| 309 local from_host, to_host = host_session.from_host, host_session.to_host; | 309 local from_host, to_host = host_session.from_host, host_session.to_host; |
| 310 | 310 |
| 311 local conn, handler = socket.tcp() | 311 local conn, handler = socket.tcp() |
