]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' of git@gitorious.org:statusnet/mainline
authorEvan Prodromou <evan@status.net>
Wed, 20 Jan 2010 20:51:55 +0000 (15:51 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 20 Jan 2010 20:51:55 +0000 (15:51 -0500)
extlib/XMPPHP/XMLStream.php
scripts/xmppdaemon.php

index d33411ec54140dafc1c527c946d05cbc931807c9..dbc4719e427f43bd223504d115d3e44dd427c9f7 100644 (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);
+               }
        }
 
        /**
index cef9c4bd074e7d049e25ddf2d8281726cd36b78d..0c118c53d6b6a52b7f5211361b615b0c08f722c7 100755 (executable)
@@ -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') {