From 239cdc25118b78e40647b729ee167a977e06d94f Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 22 Jul 2014 23:22:36 +0200 Subject: [PATCH] Cleanup + added debug lines: - cleaned up no longer used paths (previously copied to 'node' wit SVN) - added noisy debug lines to fix an error in announcement Signed-off-by: Roland Haeder --- application/hub/main/filter/class_BaseHubFilter.php | 2 +- application/hub/main/handler/class_BaseDataHandler.php | 2 +- .../announcement/class_NodeMessageAnnouncementHandler.php | 1 + application/hub/main/helper/hub/.htaccess | 1 - application/hub/main/helper/hub/announcement/.htaccess | 1 - application/hub/main/helper/hub/answer/.htaccess | 1 - application/hub/main/helper/hub/answer/announcement/.htaccess | 1 - application/hub/main/helper/hub/answer/requests/.htaccess | 1 - application/hub/main/helper/hub/class_ | 3 --- application/hub/main/helper/hub/connection/.htaccess | 1 - application/hub/main/helper/hub/requests/.htaccess | 1 - .../node/class_NodeDistributedHashTableDatabaseWrapper.php | 4 ++++ 12 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 application/hub/main/helper/hub/.htaccess delete mode 100644 application/hub/main/helper/hub/announcement/.htaccess delete mode 100644 application/hub/main/helper/hub/answer/.htaccess delete mode 100644 application/hub/main/helper/hub/answer/announcement/.htaccess delete mode 100644 application/hub/main/helper/hub/answer/requests/.htaccess delete mode 100644 application/hub/main/helper/hub/class_ delete mode 100644 application/hub/main/helper/hub/connection/.htaccess delete mode 100644 application/hub/main/helper/hub/requests/.htaccess diff --git a/application/hub/main/filter/class_BaseHubFilter.php b/application/hub/main/filter/class_BaseHubFilter.php index 1018f6fd9..ea3bd0063 100644 --- a/application/hub/main/filter/class_BaseHubFilter.php +++ b/application/hub/main/filter/class_BaseHubFilter.php @@ -63,7 +63,7 @@ class BaseHubFilter extends BaseFilter { $templateInstance->renderXmlContent($messageContent); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: Handling ' . strlen($messageContent) . ' bytes: ' . $messageContent); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: Handling ' . strlen($messageContent) . ' bytes: ' . $messageContent); /* * The template system now stores all required data as 'general' diff --git a/application/hub/main/handler/class_BaseDataHandler.php b/application/hub/main/handler/class_BaseDataHandler.php index 3b154ca84..4c7717cd3 100644 --- a/application/hub/main/handler/class_BaseDataHandler.php +++ b/application/hub/main/handler/class_BaseDataHandler.php @@ -102,7 +102,7 @@ abstract class BaseDataHandler extends BaseHandler { */ protected function prepareAnswerMessage (array $messageData, Deliverable $packageInstance) { // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send an answer message ...'); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('MESSAGE-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Going to send an answer message for ' . $this->getHandlerName() . ' ...'); // Get a helper instance based on this handler's name $helperInstance = ObjectFactory::createObjectByConfiguredName('node_answer_' . $this->getHandlerName() . '_helper_class', array($messageData)); diff --git a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php index b313071bb..684dc0801 100644 --- a/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php +++ b/application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php @@ -125,6 +125,7 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl assert(isset($messageData[$key])); // Add it + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANNOUNCEMENT-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Adding messageData[' . $key . ']=' . $messageData[$key] . ' ...'); $dataSetInstance->addCriteria($key, $messageData[$key]); } // END - foreach } diff --git a/application/hub/main/helper/hub/.htaccess b/application/hub/main/helper/hub/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/announcement/.htaccess b/application/hub/main/helper/hub/announcement/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/announcement/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/answer/.htaccess b/application/hub/main/helper/hub/answer/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/answer/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/answer/announcement/.htaccess b/application/hub/main/helper/hub/answer/announcement/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/answer/announcement/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/answer/requests/.htaccess b/application/hub/main/helper/hub/answer/requests/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/answer/requests/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/class_ b/application/hub/main/helper/hub/class_ deleted file mode 100644 index f551ef47b..000000000 --- a/application/hub/main/helper/hub/class_ +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/application/hub/main/helper/hub/connection/.htaccess b/application/hub/main/helper/hub/connection/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/connection/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/helper/hub/requests/.htaccess b/application/hub/main/helper/hub/requests/.htaccess deleted file mode 100644 index 3a4288278..000000000 --- a/application/hub/main/helper/hub/requests/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php b/application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php index 769d854d9..199f68ecf 100644 --- a/application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php +++ b/application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php @@ -300,6 +300,8 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem * @return void */ public function registerNodeByMessageData (array $messageData, Handleable $handlerInstance) { + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: handlerInstance=' . $handlerInstance->__toString() . ' - CALLED!'); + // Get a data set instance $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_DHT)); @@ -314,6 +316,8 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem // Run the "INSERT" query $this->queryInsertDataSet($dataSetInstance); + + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . '] - EXIT!'); } /** -- 2.39.5