Pinging master agent from subagent seems unnecessary if we just received a request from master agent. In an event-based program, agentx_check_session() calls agentx_send_ping() which uses agentx_synch_response() which may hang and block the whole program. This can be critical if this is important for the program to stay responsive. This patch is a workaround for this problem if the program is monitored with SNMP and therefore receives AgentX requests on a regular basis. For each received agentX request, the alarm is postponed.
Tested on master but should work on 5.4, 5.5 and 5.7.
don't send ping unless there is no trafic between master and subagent
Doesn't apply cleanly anywhere; need to figure out why...
don't send ping unless there is no trafic between master and subagent (rebased)
I have rebased the patch on top of master. There was no conflict. Let me know if it works better.
Thanks for the patch! It has been applied to the 5.4.x and above code branches and the main development tree, and will appear in future releases of the Net-SNMP package.