Regarding adding rows into mib table and querying operation

Cheng Chaoting chengchaoting____huawei.com
Tue Apr 15 11:24:33 CEST 2003


Hi Stefan,

Yes,you are right,my code is just one sample,before making index as "1",i
executed
"imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::insta
nce->clear();",so all the rows should already be cleared.

My question is that why my agent calls 'update' function when manager
inserts some new rows into mib table.For 'update' function,it is for
querying operation from manager,when agent receives the get request,'update'
function querys the other data source and update the mib table(deleting all
the old rows,filling with new rows).

For set request from manager,i think agent should call 'commit_set_request'
function,it should not call 'update' function which can lead to wrong
result.

Could you give me explain?


Best regards,
Cheng Chaoting

----- Original Message -----
From: <Stefan.Mueller-Wilken____resco.de>
To: "Cheng Chaoting" <chengchaoting____huawei.com>
Cc: <agentpp-dl____agentpp.com>
Sent: Tuesday, April 15, 2003 2:38 PM
Subject: Re: Regarding adding rows into mib table and querying operation


>
>
>
>
>
> Hi Cheng,
>
> as you can see from my previous posts on table creation, I'm no expert on
> using the update method ;-) ...
>
> Still, there is something curious about your code.
>
> >  Oidx oidIndex;
> >  oidIndex += 1;
>
> You declare your index variable as local to the method which in fact
> initializes it to zero on every call and increment it to get the index to
> use. De facto, this gives you the same index value of '1' for all
> additions!
>
> You'd better use "get_next_avail_index()" to create the required id.
> Something like
>
>
imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::instan
ce->add_row(get_next_avail_index());
>
> HTH,
>  Stefan
>




More information about the AGENTPP mailing list