From 431a3ec865dbb1d22d1663ac8d3ac1e988a67723 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 28 Jun 2013 23:38:38 +0000 Subject: [PATCH] Added some more noisy debug lines (they will be commented out later) --- .../wrapper/states/class_PeerStateLookupDatabaseWrapper.php | 6 ++++++ application/hub/main/dht/node/class_NodeDhtFacade.php | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 -- 2.39.5