diff options
author | Kim Alvefur <zash@zash.se> | 2015-11-24 19:26:27 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-11-24 19:26:27 +0100 |
commit | a14df709ba6e9f143cf4d2f5d6b788831e5739d9 (patch) | |
tree | eacf924af014b2e596facea6b9865ab76b58e707 /util/session.lua | |
parent | 0ca40214f40ee021c6b35feac832eff81fb2f3b1 (diff) | |
download | prosody-a14df709ba6e9f143cf4d2f5d6b788831e5739d9.tar.gz prosody-a14df709ba6e9f143cf4d2f5d6b788831e5739d9.zip |
util.session: How does a session relate do a connection?
Diffstat (limited to 'util/session.lua')
-rw-r--r-- | util/session.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/session.lua b/util/session.lua index 7703c265..03ddcf47 100644 --- a/util/session.lua +++ b/util/session.lua @@ -19,8 +19,15 @@ local function set_logger(session) return session; end +local function set_conn(session, conn) + session.conn = conn; + session.ip = conn:ip(); + return session; +end + return { new = new_session; set_id = set_id; set_logger = set_logger; + set_conn = set_conn; } |