[PATCH] LOCK: Remove "#ifdef _THREADS" around locking calls.
Dominik Vogt
dominik.vogt at external.thalesgroup.com
Tue Aug 17 12:55:13 CEST 2010
This is protected against execution by the code in threads.cpp anyway.
---
src/mib.cpp | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/mib.cpp b/src/mib.cpp
index debe633..a9b9689 100644
--- a/src/mib.cpp
+++ b/src/mib.cpp
@@ -2860,9 +2860,7 @@ void Mib::remove_context(const OctetStr& context)
boolean Mib::remove(const Oidx& oid)
{
boolean removed = TRUE;
-#ifdef _THREADS
lock_mib();
-#endif
// first look for a group
if (!defaultContext->remove_group(oid)) {
MibEntryPtr entry = 0;
@@ -2885,25 +2883,19 @@ boolean Mib::remove(const Oidx& oid)
}
}
else removed = TRUE;
-#ifdef _THREADS
unlock_mib();
-#endif
return removed;
}
boolean Mib::remove(const OctetStr& context, const Oidx& oid)
{
boolean removed = TRUE;
-#ifdef _THREADS
lock_mib();
-#endif
Oidx contextKey(Oidx::from_string(context));
MibContext* c = contexts.find(&contextKey);
if (!c)
{
-#ifdef _THREADS
unlock_mib();
-#endif
return FALSE;
}
if (!defaultContext->remove_group(oid)) {
@@ -2927,9 +2919,7 @@ boolean Mib::remove(const OctetStr& context, const Oidx& oid)
}
}
else removed = TRUE;
-#ifdef _THREADS
unlock_mib();
-#endif
return removed;
}
--
1.5.5.6
--7JfCtLOvnd9MIVvH--
More information about the AGENTPP
mailing list