]> git.mxchange.org Git - hub.git/commitdiff
Added some more noisy debug lines (they will be commented out later)
authorRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 23:38:38 +0000 (23:38 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Jun 2013 23:38:38 +0000 (23:38 +0000)
application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/main/dht/node/class_NodeDhtFacade.php

index a3b08c65466e080a65d8257d9077bbe5386c9cb5..e989e9fad5a48de541b9eea7be8b36098bde7630 100644 (file)
@@ -253,6 +253,12 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                // Yes, so get the current (=first) entry from it
                $rowData = $resultInstance->current();
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE-WRAPPER: rowData[' . gettype($rowData) . ']=' . print_r($rowData, TRUE));
+
+               // Assert on important elements
+               assert(isset($rowData[self::DB_COLUMN_PEER_STATE]));
+
                // Now just compare it with given state from helper instance
                $isSamePeerState = ($rowData[self::DB_COLUMN_PEER_STATE] == $helperInstance->getPrintableState());
 
index 794c38f09ee72957b0b1d494d20e84e06746f755..940065902b58f5a80f079ab7acf5cb4390a6dc6c 100644 (file)
@@ -147,11 +147,14 @@ class NodeDhtFacade extends BaseDht implements Distributable, Registerable {
                // Search for the node's session id and external IP/hostname + TCP/UDP listen port
                foreach ($handlerInstance->getSearchData() as $key) {
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData[' . $key . ']=' . $messageData[$key]);
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',key=' . $key);
 
                        // Is it there?
                        assert(isset($messageData[$key]));
 
+                       // Debug message
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-FACADE[' . __LINE__ . ']: state=' . $this->getPrintableState() . ',messageData[' . $key . ']=' . $messageData[$key]);
+
                        // Add criteria
                        $searchInstance->addCriteria(str_replace('my-', '', $key), $messageData[$key]);
                } // END - foreach