summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-20 15:51:55 -0500
committerEvan Prodromou <evan@status.net>2010-01-20 15:51:55 -0500
commit2a3cb86e29e7b0d43c4a6f22dc84462c9e6227a0 (patch)
tree85cf36a011de0bf66f726c7e3b47fd4a1afafa1d
parentdbccebb14bbc46ea0e53e5bd0e3681c77692a40a (diff)
parent906450e2f5b78a1c6f2dec2e21b9b5841df210f4 (diff)
Merge branch 'master' of git@gitorious.org:statusnet/mainline
-rw-r--r--extlib/XMPPHP/XMLStream.php14
-rwxr-xr-xscripts/xmppdaemon.php1
2 files changed, 13 insertions, 2 deletions
diff --git a/extlib/XMPPHP/XMLStream.php b/extlib/XMPPHP/XMLStream.php
index d33411ec5..dbc4719e4 100644
--- a/extlib/XMPPHP/XMLStream.php
+++ b/extlib/XMPPHP/XMLStream.php
@@ -417,7 +417,12 @@ class XMPPHP_XMLStream {
}
}
$this->log->log("RECV: $buff", XMPPHP_Log::LEVEL_VERBOSE);
- xml_parse($this->parser, $buff, false);
+ $ok = xml_parse($this->parser, $buff, false);
+ if (!$ok) {
+ $errcode = xml_get_error_code($this->parser);
+ $errstr = xml_error_string($errcode);
+ $this->log->log("XML ERROR: $errstr", XMPPHP_Log::LEVEL_VERBOSE);
+ }
} else {
# $updated == 0 means no changes during timeout.
}
@@ -671,7 +676,12 @@ class XMPPHP_XMLStream {
}
}
$this->log->log("RECV: $buff", XMPPHP_Log::LEVEL_VERBOSE);
- xml_parse($this->parser, $buff, false);
+ $ok = xml_parse($this->parser, $buff, false);
+ if (!$ok) {
+ $errcode = xml_get_error_code($this->parser);
+ $errstr = xml_error_string($errcode);
+ $this->log->log("XML ERROR: $errstr", XMPPHP_Log::LEVEL_VERBOSE);
+ }
}
/**
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index cef9c4bd0..0c118c53d 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -148,6 +148,7 @@ class XMPPDaemon extends Daemon
function handle_message(&$pl)
{
+ $this->log(LOG_DEBUG, "Received message: " . str_replace("\n", " ", var_export($pl, true)));
$from = jabber_normalize_jid($pl['from']);
if ($pl['type'] != 'chat') {