[Orxonox-commit 5905] r10564 - in code/branches/core7/src/libraries: core/class network/synchronisable

landauf at orxonox.net landauf at orxonox.net
Sun Aug 30 13:36:54 CEST 2015


Author: landauf
Date: 2015-08-30 13:36:54 +0200 (Sun, 30 Aug 2015)
New Revision: 10564

Modified:
   code/branches/core7/src/libraries/core/class/Identifier.cc
   code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
Log:
bugfix: after receiving a ClassID packet, the client erases the list of network ids (IdentifierManager::clearNetworkIDs()). afterwards, each Identifier gets its new NetworkID. therefore it's not necessary to call removeIdentifier() - in fact, this led to errors because wrong identifiers were removed (if a another identifier received the same network id from the server already before) 

Modified: code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/core7/src/libraries/core/class/Identifier.cc	2015-08-29 21:24:32 UTC (rev 10563)
+++ code/branches/core7/src/libraries/core/class/Identifier.cc	2015-08-30 11:36:54 UTC (rev 10564)
@@ -125,7 +125,6 @@
     */
     void Identifier::setNetworkID(uint32_t id)
     {
-        IdentifierManager::getInstance().removeIdentifier(this); // remove with old id
         this->networkID_ = id;
         IdentifierManager::getInstance().addIdentifier(this);    // add with new id
     }

Modified: code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc	2015-08-29 21:24:32 UTC (rev 10563)
+++ code/branches/core7/src/libraries/network/synchronisable/Synchronisable.cc	2015-08-30 11:36:54 UTC (rev 10564)
@@ -150,7 +150,7 @@
     {
         for(int i = 0; i<160; i++)
             orxout(user_error, context::network) << "classid: " << i << " identifier: " << ClassByID(i) << endl;
-        orxout(user_error, context::network) << "Assertion failed: id" << endl;
+        orxout(user_error, context::network) << "Assertion failed: Could not find Identifier for ClassID " << header.getClassID() << endl;
         orxout(user_error, context::network) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << endl;
         abort();
     }




More information about the Orxonox-commit mailing list