Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 694:b97b05261156
Set session.ip to the IP address of connecting clients
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 12 Jan 2009 02:59:45 +0000 |
parent | 623:5af5a64a729f |
child | 758:b1885732e979 |
comparison
equal
deleted
inserted
replaced
693:d8b793e612a9 | 694:b97b05261156 |
---|---|
56 end | 56 end |
57 open_sessions = open_sessions + 1; | 57 open_sessions = open_sessions + 1; |
58 log("info", "open sessions now: ".. open_sessions); | 58 log("info", "open sessions now: ".. open_sessions); |
59 local w = conn.write; | 59 local w = conn.write; |
60 session.send = function (t) w(tostring(t)); end | 60 session.send = function (t) w(tostring(t)); end |
61 session.ip = conn.ip(); | |
61 return session; | 62 return session; |
62 end | 63 end |
63 | 64 |
64 function destroy_session(session, err) | 65 function destroy_session(session, err) |
65 (session.log or log)("info", "Destroying session"); | 66 (session.log or log)("info", "Destroying session"); |