Packets: Fix PacketRegistry duplicate packet assertion
g0dil [Thu, 6 May 2010 07:35:38 +0000 (07:35 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1624 270642c3-0616-0410-b53a-bc976706d245

senf/Packets/PacketRegistry.ct

index 40afa89..dad629e 100644 (file)
@@ -103,8 +103,9 @@ template <class KeyType>
 template <class PacketType>
 prefix_ void senf::detail::PacketRegistryImpl<KeyType>::registerPacket(key_t key, int priority)
 {
-    SENF_ASSERT(registry_.insert(
-                    typename Entry::ptr(new EntryImpl<PacketType>(key,priority))).second);
+    bool ok (registry_.insert(
+                 typename Entry::ptr(new EntryImpl<PacketType>(key,priority))).second);
+    SENF_ASSERT(ok && "Duplicate packet registration");
 }
 
 template <class KeyType>