Merge branch 'master' of git@gitorious.org:statusnet/mainline

This commit is contained in:
Evan Prodromou 2010-01-20 15:51:55 -05:00
commit 2a3cb86e29
2 changed files with 13 additions and 2 deletions

View File

@ -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);
}
}
/**

View File

@ -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') {