From 147510bb0068e6bb288af093f99507c0a0ea16d5 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Thu, 14 Feb 2008 17:48:15 +0000 Subject: [PATCH] Make Packet::RemoveTag behave as documented (bug #139) --- src/common/tags.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/tags.h b/src/common/tags.h index f6b19e59e..f901117b5 100644 --- a/src/common/tags.h +++ b/src/common/tags.h @@ -128,7 +128,15 @@ Tags::Remove (T &tag) // input to this function is not a subclass of the Tag class. parent = &tag; NS_ASSERT (sizeof (T) <= Tags::SIZE); - return Remove (T::GetUid ()); + if (Peek (tag)) + { + Remove (T::GetUid ()); + return true; + } + else + { + return false; + } } template