[AGENT++] Unexpected request type for SNMP set

Jochen Katz katz at agentpp.com
Mon May 2 20:45:17 CEST 2005


Hi all,

i think the Mail below is of interest for the list. The simple check is
valid if there are no threads.

Regards,
  Jochen


> one remark or better a question to:
> 
> Jochen Katz wrote:
>>Request* req = reqList->receive(0);
>>if ( req )
>>{
>>    bool save = false;
>>    if ( req->get_type() == sNMP_PDU_SET )
>>        save = true;
>>    mib->process_request(req);
>>    if (save)
>>        mib->save_all();
>>}
> 
> Is it not better to check in the event processing loop if the agent is IDLE
> or better if the ThreadPool is IDLE (not processing any other request),
> before performing necessary house-keeping tasks like MIB storage.
> 
> NOTE: That is at least my experience in a SNMP subagent
> (Otherwise the agent may crash or deadlock in the worst case (deleting MIB
> rows during a save)).



More information about the AGENTPP mailing list