Software /
code /
verse
Changeset
383:72be3c2cf602
libs.adhoc: Don't set unintentional globals
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 05 May 2015 01:10:33 +0200 |
parents | 382:479b856a910f |
children | 384:532a379acfea |
files | libs/adhoc.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libs/adhoc.lib.lua Tue May 05 01:08:20 2015 +0200 +++ b/libs/adhoc.lib.lua Tue May 05 01:10:33 2015 +0200 @@ -12,7 +12,7 @@ local _M = {}; -function _cmdtag(desc, status, sessionid, action) +local function _cmdtag(desc, status, sessionid, action) local cmd = st.stanza("command", { xmlns = xmlns_cmd, node = desc.node, status = status }); if sessionid then cmd.attr.sessionid = sessionid; end if action then cmd.attr.action = action; end @@ -35,6 +35,7 @@ local data, state = command:handler(dataIn, states[sessionid]); states[sessionid] = state; local stanza = st.reply(stanza); + local cmdtag; if data.status == "completed" then states[sessionid] = nil; cmdtag = command:cmdtag("completed", sessionid);