aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-05-15 07:51:33 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-05-15 07:51:33 +0500
commitb3c0964aa16905d911f619eb3f13b7dbed94e235 (patch)
treee763a685fbf3fcdda3a33b2fa0220a8f5afc4dbe
parent7bfd9cc259b2ec3205464d6d679a31618360e9c8 (diff)
downloadprosody-b3c0964aa16905d911f619eb3f13b7dbed94e235.tar.gz
prosody-b3c0964aa16905d911f619eb3f13b7dbed94e235.zip
xmlhandlers: Removed another unnecessary check
-rw-r--r--core/xmlhandlers.lua24
1 files changed, 11 insertions, 13 deletions
diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua
index fc070115..573a9604 100644
--- a/core/xmlhandlers.lua
+++ b/core/xmlhandlers.lua
@@ -120,19 +120,17 @@ function init_xmlhandlers(session, stream_callbacks)
cb_error(session, "parse-error", "unexpected-element-close", name);
end
end
- if stanza then
- if #chardata > 0 then
- -- We have some character data in the buffer
- stanza:text(t_concat(chardata));
- chardata = {};
- end
- -- Complete stanza
- if #stanza.last_add == 0 then
- cb_handlestanza(session, stanza);
- stanza = nil;
- else
- stanza:up();
- end
+ if #chardata > 0 then
+ -- We have some character data in the buffer
+ stanza:text(t_concat(chardata));
+ chardata = {};
+ end
+ -- Complete stanza
+ if #stanza.last_add == 0 then
+ cb_handlestanza(session, stanza);
+ stanza = nil;
+ else
+ stanza:up();
end
end
return xml_handlers;