]> git.mxchange.org Git - hub.git/commitdiff
Improved some comments + added commented-out debug lines.
authorRoland Haeder <roland@mxchange.org>
Wed, 18 Feb 2015 17:35:12 +0000 (18:35 +0100)
committerRoland Haeder <roland@mxchange.org>
Wed, 18 Feb 2015 17:35:12 +0000 (18:35 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php
application/hub/main/tools/class_HubTools.php
application/hub/templates/xml/dht_publish/publish.xml

index 27baacd2c789c86d610fe0d0e07257fd25707b7a..ea025fcf1e2ca4e24e484a8c19296a1203c554ac 100644 (file)
@@ -106,7 +106,7 @@ class PackageRecipientDiscovery extends BaseRecipientDiscovery implements Discov
                         */
 
                        // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (' .  HubTools::determineOwnExternalAddress() . ' or ' . HubTools::determineOwnInternalAddress() . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (external=' .  HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
                } else {
                        // Debug output (may flood)
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient is different than own external address (' .  HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
index 71fb229bab0342f63db8641c596202aa985ba207..e5017a0b45f021b5c6be0b8fd03cc81476d1e9ab 100644 (file)
@@ -210,18 +210,33 @@ class HubTools extends BaseHubSystem {
         * @return      $unl    The determined internal UNL of this node
         */
        public static function determineOwnInternalAddress () {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
+
                // Is the internal_address config entry set?
                if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
+                       // Debug message
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
+
                        // Not allowed to publish internal address, so use external
                        $unl = self::determineOwnExternalAddress();
                } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address') != '') {
+                       // Debug message
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Getting config entry internal_address ...');
+
                        // Use it as internal address
                        $unl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address');
                } else {
-                       // Determine own internal address by connecting to my (coder) server at 188.138.90.169
+                       // Debug message
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Calling self::determineInternalUniversalNodeLocator() ...');
+
+                       // Determine own internal address
                        $unl = self::determineInternalUniversalNodeLocator();
                }
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ' - EXIT!');
+
                // Return it
                return $unl;
        }
index 156f0d249f3f1e206d10c51c20f35c11035bd720..811381e3b3954851dad425645981eac7d350b878 100644 (file)
@@ -37,8 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
 Array
 (
     [node_mode] => regular
-    [external_address] => 192.168.2.3
-    [listen_port] => 9061
+    [external_address] => tcp://192.168.2.3:9060
     [node_id] => 38fc625d3d9aa05654bfc90a7aea7ff72c883f1573
     [session_id] => 38fc625d3dabe9ff09b54253b298e91985191472a3
     [private_key_hash] => 38fc625d3dad67db034d7e715fae8b8ea47fefb0dc