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 | 40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf (patch) | |
tree | eacf924af014b2e596facea6b9865ab76b58e707 | |
parent | cfc3a5ad7be12ee67e1d14df04dc03acc73394f3 (diff) | |
download | prosody-40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf.tar.gz prosody-40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf.zip |
util.session: How does a session relate do a connection?
-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; } |