From 75790a096272f205dffe59c58b3642ce7c2023d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 8 May 2012 20:33:15 +0000 Subject: [PATCH] More debug messages --- application/hub/main/tools/class_HubTools.php | 17 +++++++--- docs/TODOs.txt | 33 +++++++++---------- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/application/hub/main/tools/class_HubTools.php b/application/hub/main/tools/class_HubTools.php index 2580a0582..855a59210 100644 --- a/application/hub/main/tools/class_HubTools.php +++ b/application/hub/main/tools/class_HubTools.php @@ -150,12 +150,18 @@ class HubTools extends BaseHubSystem { // Found in cache! $recipient = $selfInstance->sessionIdCache[$sessionId]; + + // Debug message + $selfInstance->debugOutput('HUB-TOOLS: sessionIdCache[' . $sessionId . ']=' . $recipient); } elseif (preg_match('/([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}:([0-9]{3,5})/', $sessionId)) { + // Hostname:port found + $selfInstance->debugOutput('HUB-TOOLS: hostname:port ' . $sessionId . ' detected.'); + // Hostname:port found $hostnameArray = explode(':', $sessionId); // Try to resolve it and add port again - // @TODO We may want to encapsulate this PHP call into an own class + // @TODO Please try to encapsulate this PHP call into an own class $recipient = gethostbyname($hostnameArray[0]) . ':' . $hostnameArray[1]; // Is it valid? @@ -163,20 +169,23 @@ class HubTools extends BaseHubSystem { // Resolving hostname->IP failed! throw new NoValidHostnameException($hostnameArray, self::EXCEPTION_HOSTNAME_NOT_FOUND); } // END - if + + // Debug message + $selfInstance->debugOutput('HUB-TOOLS: hostname:port ' . $sessionId . ' resolved to ' . $recipient); } elseif (preg_match('/([a-f0-9]{' . $selfInstance->getSessionIdLength() . '})/', $sessionId)) { // Debug message $selfInstance->debugOutput('HUB-TOOLS: Using internal session id resolver.'); // Resolve session id into a ip:port combination $recipient = $selfInstance->resolveIpPortBySessionId($sessionId); + + // Debug message + $selfInstance->debugOutput('HUB-TOOLS: session id ' . $sessionId . ' resolved to ' . $recipient); } else { // Invalid session id throw new InvalidSessionIdException($sessionId, self::EXCEPTION_SESSION_ID_IS_INVALID); } - // Output message - $selfInstance->debugOutput('HUB-TOOLS: Session id ' . $sessionId . ' resolved to ' . $recipient); - // Return it return $recipient; } diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 7c9d0c948..7f2fbd2f0 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -89,15 +89,14 @@ ./application/hub/main/nodes/regular/class_HubRegularNode.php:68: * @todo Unfinished method ./application/hub/main/nodes/regular/class_HubRegularNode.php:91: // @TODO Add some filters here ./application/hub/main/package/class_NetworkPackage.php:23: * @todo Needs to add functionality for handling the object's type -./application/hub/main/package/class_NetworkPackage.php:271: // @TODO crc32() is very weak, but it needs to be fast -./application/hub/main/package/class_NetworkPackage.php:342: // @TODO crc32() is very weak, but it needs to be fast -./application/hub/main/package/class_NetworkPackage.php:496: // @TODO We may want to do somthing more here? -./application/hub/main/package/class_NetworkPackage.php:534: * @todo Unfinished area, signature are currently not supported -./application/hub/main/package/class_NetworkPackage.php:640: // @TODO Add some logging here -./application/hub/main/package/class_NetworkPackage.php:770: // @TODO Add some logging here -./application/hub/main/package/class_NetworkPackage.php:891: // @TODO Add some content here -./application/hub/main/package/class_NetworkPackage.php:930: * @todo This may be enchanced for outgoing packages? -./application/hub/main/package/class_NetworkPackage.php:961: * @todo Unsupported feature commented out +./application/hub/main/package/class_NetworkPackage.php:277: // @TODO crc32() is very weak, but it needs to be fast +./application/hub/main/package/class_NetworkPackage.php:348: // @TODO crc32() is very weak, but it needs to be fast +./application/hub/main/package/class_NetworkPackage.php:502: // @TODO We may want to do somthing more here? +./application/hub/main/package/class_NetworkPackage.php:540: * @todo Unfinished area, signature are currently not supported +./application/hub/main/package/class_NetworkPackage.php:646: // @TODO Add some logging here +./application/hub/main/package/class_NetworkPackage.php:776: // @TODO Add some logging here +./application/hub/main/package/class_NetworkPackage.php:927: * @todo This may be enchanced for outgoing packages? +./application/hub/main/package/class_NetworkPackage.php:958: * @todo Unsupported feature commented out ./application/hub/main/package/fragmenter/class_PackageFragmenter.php:275: * @todo Implement a way to send non-announcement packages with extra-salt ./application/hub/main/package/fragmenter/class_PackageFragmenter.php:427: * @todo $helperInstance is unused ./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Do something with it @@ -135,7 +134,7 @@ ./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:324: * @todo Handle $objectCount ./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() ./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:433: * @todo Handle $keyCount -./application/hub/main/tools/class_HubTools.php:158: // @TODO We may want to encapsulate this PHP call into an own class +./application/hub/main/tools/class_HubTools.php:164: // @TODO Please try to encapsulate this PHP call into an own class ./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:105: * @todo Does a query needs to perform some actions as an active task? ./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:116: * @todo Does a queue needs to perform some actions as an active task? ./application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php:100: * @todo Does a query needs to perform some actions as an active task? @@ -214,13 +213,13 @@ ./inc/classes/main/result/class_DatabaseResult.php:382:4 * @todo Find a caching way without modifying the result array ./inc/classes/main/rng/class_RandomNumberGenerator.php:161: * @todo I had a better random number generator here but now it is somewhere lost :( ./inc/classes/main/rng/class_RandomNumberGenerator.php:83: * @todo Add site key for stronger salt! -./inc/classes/main/template/class_BaseTemplateEngine.php:1055: // @TODO This silent abort should be logged, maybe. -./inc/classes/main/template/class_BaseTemplateEngine.php:1063: // @TODO Old behaviour, will become obsolete! -./inc/classes/main/template/class_BaseTemplateEngine.php:1066: // @TODO Yet another old way -./inc/classes/main/template/class_BaseTemplateEngine.php:1132: // @TODO This silent abort should be logged, maybe. -./inc/classes/main/template/class_BaseTemplateEngine.php:1153: * @todo Make this code some nicer... -./inc/classes/main/template/class_BaseTemplateEngine.php:961: * @todo Unfinished work or don't die here. -./inc/classes/main/template/class_BaseTemplateEngine.php:978: // @TODO Non-string found so we need some deeper analysis... +./inc/classes/main/template/class_BaseTemplateEngine.php:1067: // @TODO This silent abort should be logged, maybe. +./inc/classes/main/template/class_BaseTemplateEngine.php:1075: // @TODO Old behaviour, will become obsolete! +./inc/classes/main/template/class_BaseTemplateEngine.php:1078: // @TODO Yet another old way +./inc/classes/main/template/class_BaseTemplateEngine.php:1144: // @TODO This silent abort should be logged, maybe. +./inc/classes/main/template/class_BaseTemplateEngine.php:1166: * @todo Make this code some nicer... +./inc/classes/main/template/class_BaseTemplateEngine.php:973: * @todo Unfinished work or don't die here. +./inc/classes/main/template/class_BaseTemplateEngine.php:990: // @TODO Non-string found so we need some deeper analysis... ./inc/classes/main/template/console/class_ConsoleTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() ./inc/classes/main/template/image/class_ImageTemplateEngine.php:215: * @todo Find something usefull with this! ./inc/classes/main/template/image/class_ImageTemplateEngine.php:235: * @todo Add cache creation here -- 2.39.5