Hello coders.
        Using net-snmp 5.2.1.2, the Debian Linux distribution, to build
an Agent-X sub-agent I discovered that the ping monitoring and
reattachment logic did not work.  Closer investigation disclosed that this
was related to my use of snmp_select_info instead of
agent_check_and_process.  What seemed to happen was that the function
run_alarms was simply never called - certainly not from the snmp_timeout
function.
        The problem seemed to be solved simply by adding a call of
run_alarms to snmp_timeout:

void
snmp_timeout(void)
{
    struct session_list *slp;
    snmp_res_lock(MT_LIBRARY_ID, MT_LIB_SESSION);
    for (slp = Sessions; slp; slp = slp->next) {
        snmp_sess_timeout((void *) slp);
    }
    run_alarms();
    snmp_res_unlock(MT_LIBRARY_ID, MT_LIB_SESSION);
}

Can some of the active coders comment on the problem and the proposed
solution?  I do not understand the system sufficiently well to be sure
that the addition has no negative side effects.

And perhaps make sure that it gets into future release if it is OK?

Thank you in advance.

best regards
--
Peder Chr. Nørgaard             Senior System Developer, M. Sc.
Ericsson Denmark A/S, Telebit Division
Skanderborgvej 232              tel: +45 30 91 84 31
DK-8260 Viby J, Denmark         fax: +45 89 38 51 01
        e-mail: [EMAIL PROTECTED]
(old e-mail 2000-2003: [EMAIL PROTECTED])
         (old e-mail 1992-2000: [EMAIL PROTECTED])


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to