osaf/libs/agents/saf/imma/imma_db.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/osaf/libs/agents/saf/imma/imma_db.c
b/osaf/libs/agents/saf/imma/imma_db.c
--- a/osaf/libs/agents/saf/imma/imma_db.c
+++ b/osaf/libs/agents/saf/imma/imma_db.c
@@ -676,13 +676,17 @@ void imma_mark_clients_stale(IMMA_CB *cb
******************************************************************************/
void imma_process_stale_clients(IMMA_CB *cb)
{
- /* We are LOCKED already */
IMMA_CLIENT_NODE * clnode;
SaImmHandleT *temp_ptr=0;
SaImmHandleT temp_hdl=0;
TRACE_ENTER();
+ if (m_NCS_LOCK(&cb->cb_lock, NCS_LOCK_WRITE) != NCSCC_RC_SUCCESS) {
+ TRACE_3("Lock failure");
+ return;
+ }
+
/* scan the entire handle db & check each record */
while ((clnode = (IMMA_CLIENT_NODE *)
ncs_patricia_tree_getnext(&cb->client_tree, (uint8_t
*)temp_ptr)))
@@ -707,6 +711,8 @@ void imma_process_stale_clients(IMMA_CB
}
}
+ m_NCS_UNLOCK(&cb->cb_lock, NCS_LOCK_WRITE);
+
TRACE_LEAVE();
}
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel