[AGENT++] Handling result of missing object?
Jochen Katz
katz at agentpp.com
Wed Jan 26 20:56:19 CET 2011
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().
Regards,
Jochen
More information about the AGENTPP
mailing list