A MibTable::prepare_set_request() question

Frank Fock Frank.Fock____t-online.de
Fri Aug 24 01:23:51 CEST 2001


Alex,

The standard says that each object that has no default value must
be explicitly written by a manager in order to change a RowStatus
from notReady to notInService. If your 0 value is a proper default
value why not defining it as DEFVAL?

Hope this helps.

Best regards,
Frank

Alex Finogenov wrote:

> Frank and Jochen,
>
> I have noticed, that a create request on a table with a required
> no-default-value column of an unsigned int type FAILS when the value of the
> column's varbind is 0, even though it is a valid value and varbinds for all
> other required columns are present with respectively valid values.
>
> The culprit seems to be the statement:
>
> if(!l->valid() && (l->get_value() == pvbs[i]))
> {
>     ...
>     return FALSE;
> }
>
> It is located inside MibTable::ready(), that is invoked at the end of
> MibTable::check_creation(), that is called by
> MibTable::prepare_set_request(). At the time of the failure the leaf is NOT
> valid because it is not a DEFVAL and has not passed through
> MibTable::commit_set_request(). Since the initial value for it is 0, and it
> equals to the new value (pvbs[i]), the condition fails altogether.
>
> Do you have any comments or suggestions?
>
> Thanks,
> Alex




More information about the AGENTPP mailing list