diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-05-15 07:27:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-05-15 07:27:03 +0500 |
commit | 7bfd9cc259b2ec3205464d6d679a31618360e9c8 (patch) | |
tree | 8234638af4223767dc995088512a8a3123df5b6b | |
parent | 49f84f6dbfa8348b42268f0e5c2858e48308527c (diff) | |
download | prosody-7bfd9cc259b2ec3205464d6d679a31618360e9c8.tar.gz prosody-7bfd9cc259b2ec3205464d6d679a31618360e9c8.zip |
xmlhandlers: Removed an unnecessary check
-rw-r--r-- | core/xmlhandlers.lua | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua index ed6f6a48..fc070115 100644 --- a/core/xmlhandlers.lua +++ b/core/xmlhandlers.lua @@ -14,7 +14,6 @@ local st = stanza; local tostring = tostring; local pairs = pairs; local ipairs = ipairs; -local type = type; local t_insert = table.insert; local t_concat = table.concat; @@ -62,15 +61,13 @@ function init_xmlhandlers(session, stream_callbacks) -- FIXME !!!!! for i, k in ipairs(attr) do - if type(k) == "string" then - local ns, nm = k:match("^([^|]+)|?([^|]-)$") - if ns and nm then - ns = ns_prefixes[ns]; - if ns then - attr[ns..":"..nm] = attr[k]; - attr[i] = ns..":"..nm; - attr[k] = nil; - end + local ns, nm = k:match("^([^|]+)|?([^|]-)$") + if ns and nm then + ns = ns_prefixes[ns]; + if ns then + attr[ns..":"..nm] = attr[k]; + attr[i] = ns..":"..nm; + attr[k] = nil; end end end |