]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/handler/protocol/class_BaseProtocolHandler.php
Updated 'core'.
[hub.git] / application / hub / main / handler / protocol / class_BaseProtocolHandler.php
index 3caf1ef79a486056e8f74ec1492b2f3d68e33094..cf085db5720265655f5225733bd83357c5b6b378 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -172,12 +172,10 @@ class BaseProtocolHandler extends BaseHandler {
        /**
         * If the found UNL (address) matches own external or internal address
         *
+        * @param       $unl            UNL to test
         * @return      $ifMatches      Whether the found UNL matches own addresss
         */
-       public function isOwnAddress () {
-               // Get current UNL (from universalNodeLocatorData array)
-               $currentUnl = $this->getCurrentUniversalNodeLocator();
-
+       public function isOwnAddress ($unl) {
                // Get own external UNL
                $externalUnl = HubTools::determineOwnExternalAddress();
 
@@ -185,14 +183,14 @@ class BaseProtocolHandler extends BaseHandler {
                $internalUnl = HubTools::determineOwnInternalAddress();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: currentUnl=' . $currentUnl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
-               //* DIE-DEBUG: */ die(__METHOD__.':currentUnl=' . $currentUnl . ',this='.print_r($this, TRUE));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
+               //* DIE-DEBUG: */ die(__METHOD__.':unl=' . $unl . ',this='.print_r($this, TRUE));
 
                // Is it the same?
-               $ifMatches = (($currentUnl === $externalUnl) || ($currentUnl === $internalUnl));
+               $ifMatches = (($unl === $externalUnl) || ($unl === $internalUnl));
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches));
 
                // Return result
                return $ifMatches;