mcanerim
mcanerim

Reputation: 11

How to solve SNMPAPI_NOOP error?

I'm new around here but I hope to find a answer for my question. I'm supposed to write an WinSNMP application, I already learned how the process has to be and my code is working fine until it comes to receive the message.

This is part of code where I got my error.

HSNMP_ENTITY recSrcEntity;
HSNMP_ENTITY recDstEntity;
HSNMP_CONTEXT recContext;
HSNMP_PDU recSnmpPDU;
SNMPAPI_STATUS SnmpRMsgn = SnmpRecvMsg(session, &recSrcEntity, &recDstEntity, &recContext, &recSnmpPDU);
if (SnmpRMsgn == SNMPAPI_FAILURE)
{ 
    cout << "Error: Message Not Received." << endl;
    getchar();
    SNMPAPI_STATUS a = SnmpGetLastError(session); // Error code 8 : SNMPAPI_NOOP
    return SnmpGetLastError(session);
}

If needed I can provide more of the code.

Upvotes: 1

Views: 155

Answers (0)

Related Questions