aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-01 21:03:17 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-01 21:03:17 +0000
commit651f61921bc5a867fdba3337ae7541fa4feccf7d (patch)
tree267bb4e32e4655ad6bac8cbda16e04ebebc48859 /util/stanza.lua
parent2f5a9cd4ede54690f4fd1633ab201add613a5645 (diff)
parent29e84d0af11fad1c6091340978065b7586193228 (diff)
downloadprosody-651f61921bc5a867fdba3337ae7541fa4feccf7d.tar.gz
prosody-651f61921bc5a867fdba3337ae7541fa4feccf7d.zip
Merge with 0.7
Diffstat (limited to 'util/stanza.lua')
-rw-r--r--util/stanza.lua6
1 files changed, 3 insertions, 3 deletions
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