From 675aab41f91a524d114f43ded53569f9496197f2 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 2 Mar 2010 00:50:54 +0500 Subject: util.stanza: Fixed nil global accesses. --- util/stanza.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/stanza.lua b/util/stanza.lua index 065888d0..ad982d42 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -247,14 +247,14 @@ function deserialize(stanza) for i=1,#attr do attr[i] = nil; end local attrx = {}; for att in pairs(attr) do - if s_find(att, "|", 1, true) and not s_find(k, "\1", 1, true) then - local ns,na = s_match(k, "^([^|]+)|(.+)$"); + if s_find(att, "|", 1, true) and not s_find(att, "\1", 1, true) then + local ns,na = s_match(att, "^([^|]+)|(.+)$"); attrx[ns.."\1"..na] = attr[att]; attr[att] = nil; end end for a,v in pairs(attrx) do - attr[x] = v; + attr[a] = v; end setmetatable(stanza, stanza_mt); for _, child in ipairs(stanza) do -- cgit v1.2.3 From 29e84d0af11fad1c6091340978065b7586193228 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 2 Mar 2010 00:51:27 +0500 Subject: util.sasl: Fixed a nil global access. --- util/sasl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/sasl.lua b/util/sasl.lua index 9c8fff78..2aa7fa1f 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -143,7 +143,7 @@ function method:process(message) end -- load the mechanisms -load_mechs = {"plain", "digest-md5", "anonymous", "scram"} +local load_mechs = {"plain", "digest-md5", "anonymous", "scram"} for _, mech in ipairs(load_mechs) do local name = "util.sasl."..mech; local m = require(name); -- cgit v1.2.3