# HG changeset patch # User daurnimator # Date 1294196713 0 # Node ID 13a5a8df7c34cb7abf31915379d2efff4db00568 # Parent ed70d20fc133fb9e98b566768b5ac016b8ac9fbf stanza_router: Replace xmlns == nil checks with 'not xmlns' diff -r ed70d20fc133 -r 13a5a8df7c34 core/stanza_router.lua --- a/core/stanza_router.lua Wed Jan 05 03:03:40 2011 +0000 +++ b/core/stanza_router.lua Wed Jan 05 03:05:13 2011 +0000 @@ -29,7 +29,7 @@ return true; end end - if stanza.attr.xmlns == nil then + if not stanza.attr.xmlns then log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); @@ -109,7 +109,7 @@ return; -- FIXME what should we do here? end]] -- FIXME - if (origin.type == "s2sin" or origin.type == "c2s" or origin.type == "component") and xmlns == nil then + if (origin.type == "s2sin" or origin.type == "c2s" or origin.type == "component") and not xmlns then if origin.type == "s2sin" and not origin.dummy then local host_status = origin.hosts[from_host]; if not host_status or not host_status.authed then -- remote server trying to impersonate some other server? @@ -122,7 +122,7 @@ local h = hosts[stanza.attr.to or origin.host or origin.to_host]; if h then local event; - if xmlns == nil then + if not xmlns then if stanza.name == "iq" and (stanza.attr.type == "set" or stanza.attr.type == "get") then event = "stanza/iq/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name; else