# HG changeset patch # User Goffi # Date 1448916878 -3600 # Node ID aa60bd58ac23fce170b483a1ea006a2c2d0a788f # Parent 3765e10ec52fa77dd4798b2a97615403e494dcf3 plugin (xml log): workaround for a crash on big stanzas diff -r 3765e10ec52f -r aa60bd58ac23 src/plugins/plugin_misc_xmllog.py --- a/src/plugins/plugin_misc_xmllog.py Mon Nov 30 20:42:14 2015 +0100 +++ b/src/plugins/plugin_misc_xmllog.py Mon Nov 30 21:54:38 2015 +0100 @@ -49,7 +49,9 @@ return XmlStream.send(self, obj) def dataReceived(self, data): - self._host.bridge.xmlLog("IN", data.decode('utf-8'), self._profile) + # FIXME: we use "replace" here because a big stanza can be cut in the middle of a unicode char + # this plugin should probably moved to a better place, where stanzas are fully received + self._host.bridge.xmlLog("IN", data.decode('utf-8', 'replace'), self._profile) return XmlStream.dataReceived(self, data)