aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-11-24 19:26:27 +0100
committerKim Alvefur <zash@zash.se>2015-11-24 19:26:27 +0100
commit40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf (patch)
treeeacf924af014b2e596facea6b9865ab76b58e707
parentcfc3a5ad7be12ee67e1d14df04dc03acc73394f3 (diff)
downloadprosody-40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf.tar.gz
prosody-40f592ecf0d56591183a1b18ba7d7a0ba5fa87cf.zip
util.session: How does a session relate do a connection?
-rw-r--r--util/session.lua7
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;
}