From 9deee5e0ea07d0a3e5c6aade78cc8bdcda6b6534 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 12 Aug 2021 16:14:47 +0200 Subject: [PATCH] Continued: - added logging of socketType class field - added some noisy debug lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../hub/classes/container/socket/class_SocketContainer.php | 3 ++- .../classes/handler/package/class_NetworkPackageHandler.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/hub/classes/container/socket/class_SocketContainer.php b/application/hub/classes/container/socket/class_SocketContainer.php index 1cc0d9838..c2bb59445 100644 --- a/application/hub/classes/container/socket/class_SocketContainer.php +++ b/application/hub/classes/container/socket/class_SocketContainer.php @@ -195,9 +195,10 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita // Get current package data $packageInstance = $this->getPackageDataInstance(); + //* DEBUG-DIE: */ if ($this->getSocketType() == StorableSocket::CONNECTION_TYPE_INCOMING) { die(sprintf('[%s:%d]: packageInstance=%s', __METHOD__, __LINE__, print_r($packageInstance, TRUE))); } // So, does both match? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: packageInstance->recipientUnl=%s', strtoupper($this->getSocketProtocol()), $packageInstance->getRecipientUnl())); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: this->socketType=%s,packageInstance->recipientUnl=%s', strtoupper($this->getSocketProtocol()), $this->getSocketType(), $packageInstance->getRecipientUnl())); //* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getSocketProtocol()) . '-SOCKET: unl=' . $unl . ',packageInstance=' . print_r($packageInstance, true)); $matches = (!empty($packageInstance->getRecipientUnl()) && $packageInstance->getRecipientUnl() === $unl); diff --git a/application/hub/classes/handler/package/class_NetworkPackageHandler.php b/application/hub/classes/handler/package/class_NetworkPackageHandler.php index 5c83d26d4..7b7cfda87 100644 --- a/application/hub/classes/handler/package/class_NetworkPackageHandler.php +++ b/application/hub/classes/handler/package/class_NetworkPackageHandler.php @@ -721,6 +721,7 @@ class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Recei $infoInstance = $this->getRegistryInstance()->getInfoInstanceFromPackageInstance($packageInstance); // Test helper instance + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE-HANDLER: infoInstance[]=%s', gettype($infoInstance))); if (is_null($infoInstance)) { // Throw NPE throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); -- 2.39.5