Comparison

mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 2602:324a6a3b730b

mod_storage_xmlarchive: Rename variable, we can afford to use the full word 'session'
author Kim Alvefur <zash@zash.se>
date Mon, 06 Mar 2017 00:53:01 +0100
parent 2601:ba5757dc883d
child 2632:995d4d9f5d89
comparison
equal deleted inserted replaced
2601:ba5757dc883d 2602:324a6a3b730b
86 local function cb(_, stanza) 86 local function cb(_, stanza)
87 assert(not result, "Multiple items in chunk"); 87 assert(not result, "Multiple items in chunk");
88 result = stanza; 88 result = stanza;
89 end 89 end
90 90
91 local stream_sess = { notopen = true }; 91 local stream_session = { notopen = true };
92 local stream_callbacks = { handlestanza = cb, stream_ns = "jabber:client", default_ns = "jabber:client" }; 92 local stream_callbacks = { handlestanza = cb, stream_ns = "jabber:client", default_ns = "jabber:client" };
93 local stream = new_stream(stream_sess, stream_callbacks); 93 local stream = new_stream(stream_session, stream_callbacks);
94 local dates = dm.list_load(username, module.host, self.store) or empty; 94 local dates = dm.list_load(username, module.host, self.store) or empty;
95 local function reset_stream() 95 local function reset_stream()
96 stream:reset(); 96 stream:reset();
97 stream_sess.notopen = true; 97 stream_session.notopen = true;
98 stream:feed(st.stanza("stream", { xmlns = "jabber:client" }):top_tag()); 98 stream:feed(st.stanza("stream", { xmlns = "jabber:client" }):top_tag());
99 stream_sess.notopen = nil; 99 stream_session.notopen = nil;
100 end 100 end
101 reset_stream(); 101 reset_stream();
102 102
103 local limit = query.limit; 103 local limit = query.limit;
104 local start_day, step, last_day = 1, 1, #dates; 104 local start_day, step, last_day = 1, 1, #dates;