[AGENT++] Handling result of missing object?
dominik.vogt at external.thalesgroup.com
dominik.vogt at external.thalesgroup.com
Thu Jan 27 11:13:58 CET 2011
On Wed, Jan 26, 2011 at 08:56:19PM +0100, Jochen Katz wrote:
> Am 26.01.2011 08:48, schrieb dominik.vogt at external.thalesgroup.com:
> > On Tue, Jan 25, 2011 at 10:00:34PM +0100, Jochen Katz wrote:
> >> Am 25.01.2011 08:30, schrieb dominik.vogt at external.thalesgroup.com:
> >>
> >> > if (iv_vb_value &&
> >> > iv_vb_value->valid() &&
> >> > - (iv_vb_value->get_syntax() == sNMP_SYNTAX_INT32 ))
> >> > + (get_syntax() == sNMP_SYNTAX_INT32 ))
> >>
> > Note that *iv_vb_value is of type *SnmpSyntax* and does not know
> > anything about the exception status of the *Vb* where it is
> > stored. iv_vb_value->get_syntax() always returns
> > sNMP_SYNTAX_INT32 because that is its syntax type. On the other
> > hand, Vb::get_value() does roughly the same but looks at the
> > exception_status before calling iv_vb_value->get_syntax().
>
> Yes, but I still see no way to get a Vb object where exception status is
> set and iv_vb_value is not NULL. And if iv_vb_value is NULL, the current
> get_value() functions will return INVALID. Additionally I see no
> possibility where iv_vb_value is valid and Vb:get_syntax() returns
> something different than iv_vb_value->get_syntax().
Possible or not, that's actually what happens:
I sent a GETBULK request that first queried eight scalars and then
one INT32 column of two table rows. The second row did not exist,
but the first one did.
==> get_syntax() states there was an exception, but get_value()
returns SUCCESS.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
More information about the AGENTPP
mailing list