A question
Frank Fock
Frank.Fock____t-online.de
Mon Nov 19 20:35:13 CET 2001
Hi Alex,
As you can see I have CCed your message on the list.
Please find my comments inline:
Alex Finogenov wrote:
> Frank,
>
> I got a strange error reply on my submission to 'dlmanager at agentpp.com', so
> I am forwarding this message directly to you.
>
> I overloaded MibTable::update() to retrieve data from repository and
> hardware, and populate the rows. Is there a way to interrupt the agent's
> processing if an error occurred during this process?
No. The update method should not fail. Nevertheless, it may, but this
should only be a very rare case! So, IMHO there is no need the return
any error code while doing a update. However, you can as you described
below by remembering the error status of the operation and returning
it while one of the table's instrumentation methods (pepare_set_request, ...)
are called.
>
> I do report a GenError if during the database access by calling
> Mib::requestList->error(req->get_transaction_id(), subRequestId, status) ,
> but I would like to stop wasteful continuation of the agent's computations
> after this call and go straight to sending a response, and then back to
> listening for requests. Since MibTable::update() is void, Mib::find_next()
> (during, say, GetNext request invokes MibTable::update() and from that point
> always returns SNMP_ERROR_SUCCESS.
Are you sure that doing a shortcut here will save significant CPU time?
>
>
> Do you have an advise for me without making modifications to the Agent++
> libraries or overloading a large piece of code? So far I have managed not to
> do any of this.
It would be difficult and I would not recommend it.
Hope this helps anyway.
Best regards,
Frank
More information about the AGENTPP
mailing list