/**************************************************************************** Name : mqa_client_tree_destroy Description : This routine destroys the MQA client tree. Arguments : destroy_info - ptr to the destroy info Return Values : None Notes : None ******************************************************************************/ static void mqa_client_tree_destroy(MQA_CB *mqa_cb) { uns32 rc = NCSCC_RC_SUCCESS; /* take the cb lock */ if ((rc = m_NCS_LOCK(&mqa_cb->cb_lock, NCS_LOCK_WRITE)) != NCSCC_RC_SUCCESS) { m_LOG_MQSV_A(MQA_CLIENT_TREE_DESTROY_FAILED, NCSFL_LC_MQSV_INIT, NCSFL_SEV_ERROR, rc, __FILE__, __LINE__); return; } /* cleanup the client tree */ mqa_client_tree_cleanup(mqa_cb); /* destroy the tree */ ncs_patricia_tree_destroy(&mqa_cb->mqa_client_tree); /* giveup the cb lock */ m_NCS_UNLOCK(&mqa_cb->cb_lock, NCS_LOCK_WRITE); return; }
/**************************************************************************** Name : mqa_client_tree_destroy Description : This routine destroys the MQA client tree. Arguments : destroy_info - ptr to the destroy info Return Values : None Notes : None ******************************************************************************/ static void mqa_client_tree_destroy(MQA_CB *mqa_cb) { uint32_t rc = NCSCC_RC_SUCCESS; TRACE_ENTER(); /* take the cb lock */ if ((rc = m_NCS_LOCK(&mqa_cb->cb_lock, NCS_LOCK_WRITE)) != NCSCC_RC_SUCCESS) { TRACE_2("FAILURE: Client database Finalization Failed"); return; } /* cleanup the client tree */ mqa_client_tree_cleanup(mqa_cb); /* destroy the tree */ ncs_patricia_tree_destroy(&mqa_cb->mqa_client_tree); /* giveup the cb lock */ m_NCS_UNLOCK(&mqa_cb->cb_lock, NCS_LOCK_WRITE); TRACE_LEAVE(); return; }