From: g0dil Date: Thu, 6 May 2010 07:35:38 +0000 (+0000) Subject: Packets: Fix PacketRegistry duplicate packet assertion X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=1dec1fc58d8495489db319b2e2efaaa4a55cb9ce;p=senf.git Packets: Fix PacketRegistry duplicate packet assertion git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1624 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Packets/PacketRegistry.ct b/senf/Packets/PacketRegistry.ct index 40afa89..dad629e 100644 --- a/senf/Packets/PacketRegistry.ct +++ b/senf/Packets/PacketRegistry.ct @@ -103,8 +103,9 @@ template template prefix_ void senf::detail::PacketRegistryImpl::registerPacket(key_t key, int priority) { - SENF_ASSERT(registry_.insert( - typename Entry::ptr(new EntryImpl(key,priority))).second); + bool ok (registry_.insert( + typename Entry::ptr(new EntryImpl(key,priority))).second); + SENF_ASSERT(ok && "Duplicate packet registration"); } template