From: Roland Häder Date: Fri, 28 Jun 2013 23:38:38 +0000 (+0000) Subject: Added some more noisy debug lines (they will be commented out later) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=431a3ec865dbb1d22d1663ac8d3ac1e988a67723;p=hub.git Added some more noisy debug lines (they will be commented out later) --- diff --git a/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php b/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php index a3b08c654..e989e9fad 100644 --- a/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/states/class_PeerStateLookupDatabaseWrapper.php @@ -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()); diff --git a/application/hub/main/dht/node/class_NodeDhtFacade.php b/application/hub/main/dht/node/class_NodeDhtFacade.php index 794c38f09..940065902 100644 --- a/application/hub/main/dht/node/class_NodeDhtFacade.php +++ b/application/hub/main/dht/node/class_NodeDhtFacade.php @@ -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