Exemple #1
0
CSNMPMessage *CSNMPMessageQueue::GetEntry(const unsigned long uniqueId)
{
  CSNMPMessageQueueElt *msgEltPtr = m_head.GetNext();
  CSNMPMessage *returnVal = NULL;

  while (msgEltPtr){
    if ((returnVal = msgEltPtr->TestId(uniqueId)))
      return returnVal;
    msgEltPtr = msgEltPtr->GetNext();
  }
  return 0;
}
Exemple #2
0
int CSNMPMessageQueue::DeleteEntry(const unsigned long uniqueId)
{
  CSNMPMessageQueueElt *msgEltPtr = m_head.GetNext();

  while (msgEltPtr){
    if (msgEltPtr->TestId(uniqueId)) {
      delete msgEltPtr;
      m_msgCount--;
      return SNMP_CLASS_SUCCESS;
    }
    msgEltPtr = msgEltPtr->GetNext();
  }
  return SNMP_CLASS_INVALID_REQID;
}
int CSNMPMessageQueue::DeleteEntry(const unsigned long uniqueId)
{
  CSNMPMessageQueueElt *msgEltPtr = m_head.GetNext();

  while (msgEltPtr){
    if (msgEltPtr->TestId(uniqueId)) {
      delete msgEltPtr;
      m_msgCount--;
      LOG_BEGIN(DEBUG_LOG | 10);
      LOG("MsgQueue: Removed entry (req id)");
      LOG(uniqueId);
      LOG_END;
      return SNMP_CLASS_SUCCESS;
    }
    msgEltPtr = msgEltPtr->GetNext();
  }
  return SNMP_CLASS_INVALID_REQID;
}