From 158ba6be41ff4d352862ed05441b7398e953bd17 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 29 Jun 2015 02:40:34 +0200 Subject: [PATCH] Moved 'protocolName' to 'core'. Signed-off-by: Roland Haeder --- application/hub/main/class_BaseHubSystem.php | 24 ------------------- .../main/listener/tcp/class_TcpListener.php | 5 +++- core | 2 +- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/application/hub/main/class_BaseHubSystem.php b/application/hub/main/class_BaseHubSystem.php index c8e141df1..d8b886856 100644 --- a/application/hub/main/class_BaseHubSystem.php +++ b/application/hub/main/class_BaseHubSystem.php @@ -79,11 +79,6 @@ class BaseHubSystem extends BaseFrameworkSystem { */ private $infoInstance = NULL; - /** - * Name of used protocol - */ - private $protocolName = 'invalid'; - /** * Protected constructor * @@ -310,25 +305,6 @@ class BaseHubSystem extends BaseFrameworkSystem { return $this->getConfigInstance()->getConfigEntry('session_id'); } - /** - * Getter for protocol name - * - * @return $protocolName Name of used protocol - */ - public final function getProtocolName () { - return $this->protocolName; - } - - /** - * Setter for protocol name - * - * @param $protocolName Name of used protocol - * @return void - */ - protected final function setProtocolName ($protocolName) { - $this->protocolName = $protocolName; - } - /** * Constructs a callable method name from given socket error code. If the * method is not found, a generic one is used. diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index 67da7ae6e..7ef6a1f05 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -282,10 +282,13 @@ class TcpListener extends BaseListener implements Listenable { $this->handleSocketError(__METHOD__, __LINE__, $newSocket, array('0.0.0.0', '0')); } // END - if + // Get node instance + $nodeInstance = Registry::getRegistry()->getInstance('node'); + // Create a faked package data array $packageData = array( NetworkPackage::PACKAGE_DATA_SENDER => $peerName . ':0', - NetworkPackage::PACKAGE_DATA_RECIPIENT => $this->getSessionId(), + NetworkPackage::PACKAGE_DATA_RECIPIENT => $nodeInstance->getSessionId(), NetworkPackage::PACKAGE_DATA_STATUS => NetworkPackage::PACKAGE_STATUS_FAKED ); diff --git a/core b/core index c33ae28f2..e18cb1a84 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c33ae28f2865cdcfb330dbbc6e8159b1d17b9ce0 +Subproject commit e18cb1a8484d0cfe82812f4446738aa31d669f1e -- 2.39.5