Software /
code /
prosody
Changeset
4975:6f689c155186
adhoc.lib: Make some globals local
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 18 Jul 2012 21:18:17 +0200 |
parents | 4974:1574f18b0ca4 |
children | 4976:0875c9208580 |
files | plugins/adhoc/adhoc.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/adhoc/adhoc.lib.lua Mon Jul 09 20:39:55 2012 +0200 +++ b/plugins/adhoc/adhoc.lib.lua Wed Jul 18 21:18:17 2012 +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);