]> git.mxchange.org Git - hub.git/commitdiff
Added code ...
authorRoland Haeder <roland@mxchange.org>
Thu, 3 Sep 2015 20:13:32 +0000 (22:13 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 3 Sep 2015 20:13:32 +0000 (22:13 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
application/hub/classes/class_BaseHubSystem.php
application/hub/classes/package/class_NetworkPackage.php

index 77bf1c3456bf5096e76cb203d92354e44a250413..bcdb5581d61dfecbc646f5b308fe33d89dcc8223 100644 (file)
@@ -35,6 +35,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
        const EXCEPTION_MULTIPLE_MESSAGE_SENT         = 0x909;
        const EXCEPTION_DHT_BOOTSTRAP_NOT_ATTEMPTED   = 0x90a;
        const EXCEPTION_INVALID_UNL                   = 0x90b;
+       const EXCEPTION_INVALID_PRIVATE_KEY_HASH      = 0x90c;
 
        // Message status codes
        const MESSAGE_STATUS_CODE_OKAY = 'OKAY';
index abf479254dd98e86a4f5b9748c6d51536fb25ab4..af1de4a2a5319b5d33b080685f8b509014039550 100644 (file)
@@ -364,7 +364,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                        // Don't accept empty hashes
                        if (empty($senderData[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH])) {
                                // Don't accept
-                               throw new InvalidPrivateKeyHashException(array($this, $senderData, 'empty hash in senderData'));
+                               throw new InvalidPrivateKeyHashException(array($this, $senderData, 'empty hash in senderData'), self::EXCEPTION_INVALID_PRIVATE_KEY_HASH);
                        } // END - if
 
                        // Return it
@@ -378,7 +378,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Don't accept empty keys
                if (empty($decodedData[self::PACKAGE_CONTENT_PRIVATE_KEY_HASH])) {
                        // This needs fixing
-                       throw new InvalidPrivateKeyHashException(array($this, $senderData, 'empty hash in decodedData'));
+                       throw new InvalidPrivateKeyHashException(array($this, $senderData, 'empty hash in decodedData'), self::EXCEPTION_INVALID_PRIVATE_KEY_HASH);
                } // END - if
 
                // There is no DHT entry so, accept the hash from decoded data