]> git.mxchange.org Git - hub.git/commitdiff
News/README updated, misc fixes to BaseHubNode class
authorRoland Häder <roland@mxchange.org>
Fri, 1 May 2009 08:46:26 +0000 (08:46 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 1 May 2009 08:46:26 +0000 (08:46 +0000)
application/hub/main/nodes/class_BaseHubNode.php
docs/NEWS
docs/README
index.php
package.sh

index c0dfac164a2723ba3b383afbda0a37c4627fd9a1..03f8f5052393fed1020b9200240cf14442966035 100644 (file)
@@ -78,8 +78,11 @@ class BaseHubNode extends BaseFrameworkSystem implements Updateable {
 
                // Run through all configured IPs
                foreach (explode(',', $this->getConfigInstance()->readConfig('hub_bootstrap_nodes')) as $ipPort) {
 
                // Run through all configured IPs
                foreach (explode(',', $this->getConfigInstance()->readConfig('hub_bootstrap_nodes')) as $ipPort) {
+                       // Split it up in IP/port
+                       $ipPortArray = explode(':', $ipPort);
+
                        // Does it match?
                        // Does it match?
-                       if (substr($ipPort, 0, strlen($remoteAddr)) == $remoteAddr) {
+                       if ($ipPortArray[0] == $remoteAddr) {
                                // Found it!
                                $isFound = true;
 
                                // Found it!
                                $isFound = true;
 
@@ -91,7 +94,7 @@ class BaseHubNode extends BaseFrameworkSystem implements Updateable {
 
                                // Stop further searching
                                break;
 
                                // Stop further searching
                                break;
-                       } elseif (substr($ipPort, 0, strlen($this->getConfigInstance()->readConfig('node_listen_addr'))) == $this->getConfigInstance()->readConfig('node_listen_addr')) {
+                       } elseif ($ipPortArray[0] == $this->getConfigInstance()->readConfig('node_listen_addr')) {
                                // IP matches listen address. At this point we really don't care
                                // if we can also listen on that address!
                                $isFound = true;
                                // IP matches listen address. At this point we really don't care
                                // if we can also listen on that address!
                                $isFound = true;
index b41180a2f79c71b8532596562b9a9a3b5495a585..c4eb118ad16a387167c8bb0e51942d668876d194 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,5 +1,13 @@
-NEWS
-====
+NEWS / ChangeLog
+================
+
+[2009-04-30]
+------------
+- Detection of own IP address fixed (but might still be rewritten)
+- Boot-node code moved from NaseHubNode class to its own class (cleanup)
+- FileNotFoundException in ConsoleTools was caught without any console
+  ouput which is not recommended.
+- README updated to reflect changes in some revisions ago
 
 [2009-03-30]
 ------------
 
 [2009-03-30]
 ------------
@@ -27,7 +35,7 @@ Links to used software:
 ArgoUML (SVN checkout):
   http://argouml.tigris.org
 
 ArgoUML (SVN checkout):
   http://argouml.tigris.org
 
-FreeMind:
+FreeMind: ("unoffical" but newer packages)
   http://freemind.sourceforget.net
 
 OpenOffice:
   http://freemind.sourceforget.net
 
 OpenOffice:
index 8639c614ecca1895fc220168c988428dfe8749b7..5a8950ed84fe9e524c5b1b19d7f58b264e3623e5 100644 (file)
@@ -41,6 +41,7 @@ mode=master   -  A master-node holds a list of known nodes and which types of
 2.) Current development notices:
 --------------------------------------------------------------------------------
 
 2.) Current development notices:
 --------------------------------------------------------------------------------
 
-These modes are currently not yet finished. If you try an invalid out you may
-get an exception called 'ClassNotFoundException' which has to be rewritten to
-test if the mode is valid and output a nicer message to the user.
+These modes are currently not yet finished. If you try an invalid out you now
+get a nice and muich smaller error message. We still need to add a 'help'
+command-line parameter and many more. This should be done with a nice helper
+class and not just 'hey, my code runs' code.
index 3945af962076cc247ed0e9b1ab2e30f6a3c3e30d..b77289f9a3356ca3aa09b77e8b3e175cd5ba10ae 100644 (file)
--- a/index.php
+++ b/index.php
@@ -60,7 +60,7 @@ final class ApplicationEntryPoint {
         * @param       $silentMode             Wether not silent mode is turned on
         * @return      void
         */
         * @param       $silentMode             Wether not silent mode is turned on
         * @return      void
         */
-       public static function app_die ($message = "", $code = false, $extraData = "", $silentMode = false) {
+       public static function app_die ($message = '', $code = false, $extraData = '', $silentMode = false) {
                // Is this method already called?
                if (defined('EMERGENCY_EXIT_CALLED')) {
                        // Then output the text directly
                // Is this method already called?
                if (defined('EMERGENCY_EXIT_CALLED')) {
                        // Then output the text directly
@@ -73,14 +73,14 @@ final class ApplicationEntryPoint {
                // Is a message set?
                if (empty($message)) {
                        // No message provided
                // Is a message set?
                if (empty($message)) {
                        // No message provided
-                       $message = "No message provided!";
+                       $message = 'No message provided!';
                } // END - if
 
                // Get config instance
                $configInstance = FrameworkConfiguration::getInstance();
 
                // Do we have debug installation?
                } // END - if
 
                // Get config instance
                $configInstance = FrameworkConfiguration::getInstance();
 
                // Do we have debug installation?
-               if (($configInstance->readConfig('product_install_mode') == "productive") || ($silentMode === true)) {
+               if (($configInstance->readConfig('product_install_mode') == 'productive') || ($silentMode === true)) {
                        // Abort here
                        die();
                } // END - if
                        // Abort here
                        die();
                } // END - if
@@ -106,7 +106,7 @@ final class ApplicationEntryPoint {
 
                        // Get and prepare backtrace for output
                        $backtraceArray = debug_backtrace();
 
                        // Get and prepare backtrace for output
                        $backtraceArray = debug_backtrace();
-                       $backtrace = "";
+                       $backtrace = '';
                        foreach ($backtraceArray as $key => $trace) {
                                if (!isset($trace['file'])) $trace['file'] = __FILE__;
                                if (!isset($trace['line'])) $trace['line'] = __LINE__;
                        foreach ($backtraceArray as $key => $trace) {
                                if (!isset($trace['file'])) $trace['file'] = __FILE__;
                                if (!isset($trace['line'])) $trace['line'] = __LINE__;
@@ -161,7 +161,7 @@ final class ApplicationEntryPoint {
        }
 
        /**
        }
 
        /**
-        * Determines the correct absolute path for all include
+        * Determines the correct absolute path for all includes
         *
         * @return      $basePath       Base path (core) for all includes
         */
         *
         * @return      $basePath       Base path (core) for all includes
         */
index 25bf0b4d6bf34e284b70b54b138963647a2716f4..c7d12c053abccb8912baddf8ac23ce0bf8d56e71 100755 (executable)
@@ -3,14 +3,14 @@
 sh ./clear-cache.sh
 
 echo -n "$0: Packaging... "
 sh ./clear-cache.sh
 
 echo -n "$0: Packaging... "
-zip -9 shipsimu-hub_dev.zip docs/* Doxyfile *.php *.sh > /dev/null 2>&1
+zip -9 gos-hub_dev.zip docs/* Doxyfile *.php *.sh > /dev/null 2>&1
 echo -n "."
 echo -n "."
-zip -9r shipsimu-hub_dev.zip application/ db/ devel/ Doxyfile inc/ templates/ tests/ > /dev/null 2>&1
+zip -9r gos-hub_dev.zip application/ db/ devel/ Doxyfile inc/ templates/ tests/ > /dev/null 2>&1
 echo -n "."
 echo -n "."
-zip -d shipsimu-hub_dev.zip docs/warn.log db/*/*.serialized > /dev/null 2>&1
+zip -d gos-hub_dev.zip docs/warn.log db/*/*.serialized > /dev/null 2>&1
 echo ". done"
 
 echo "$0: Renaming..."
 echo ". done"
 
 echo "$0: Renaming..."
-mv shipsimu-hub_dev.zip shipsimu-hub_dev_`date +%Y%m%d_%H%M%S`.zip
+mv gos-hub_dev.zip gos-hub_dev_`date +%Y%m%d_%H%M%S`.zip
 
 echo "$0: All done."
 
 echo "$0: All done."