Regarding adding rows into mib table and querying operation
Cheng Chaoting
chengchaoting____huawei.com
Tue Apr 15 10:41:08 CEST 2003
Hi All,
I want to do the request operations to one mib table,using Agent++,for querying data rows from mib table.
It is my sample code,i overrided update function:
void imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::update(Request* req)
{
static unsigned long ulLastTransID = 0;
static int iFirst = 1;
if(iFirst)
{
iFirst = 0;
}
else if(ulLastTransID == req->get_transaction_id())
{
printf( "Transation ID is same\n" );
}
ulLastTransID = req->get_transaction_id();
imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::instance->clear();
Oidx oidIndex;
oidIndex += 1;
//Add the row in MIB with index
MibTableRow *pRow = imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::instance->add_row(oidIndex);
unsigned long p1 = 2;
unsigned long p2 = 3;
long p3 = 5;
long p4 = rowActive;
imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::instance->set_row(pRow, p1, p2, p3, p4 );
}
It works fine,when manager sends get request to agent,the result is correct.
But when i added some rows into this table,i found agent called the above 'update' function,so the adding operation was not effective,i could not add some rows into this table whether i overrided 'commit_set_request' function or not?
Could anyone give me some explain and solutions?
Thanks very much!
Regards,
Cheng Chaoting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20030415/0c35a349/attachment.htm
More information about the AGENTPP
mailing list