Regarding MibTable::commit_set_request
Cheng Chaoting
chengchaoting____huawei.com
Mon May 12 12:44:05 CEST 2003
Dear All,
In MibTable::commit_set_request function,do we need to truncate the redundant columns?Suppose,for one table,every row has 4 columns,when manager wants to create one row,but it inputs 5 columns,so,i think agent should truncate the last column.How can we implement it?
I wrote the following code:
int imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::commit_set_request(Request* req, int ind)
{
//--AgentGen BEGIN=hwIMAPNorthboundCommonManagerInformationEntry::commit_set_request
//--AgentGen END
int ivbSize = req->subrequests();
int iMaxVbsAllowed = ivbSize % 4;
iMaxVbsAllowed = ivbSize - iMaxVbsAllowed;
req->trim_request(iMaxVbsAllowed); //here i use trim_request to truncate the redundant columns
for(int i = ind; i < iMaxVbsAllowed; i = i + 4)
{
Oidx oidRowIndex = imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::instance->index(req->get_oid(i));
int iCmd;
req->get_value(i).get_value(iCmd);
if(iCmd == rowDestroy)
...............
}
}
When Rowstatus is CreateAndGo,it works fine,but if Rowstatus is RowDestroy,agent doesn't execute the 'for' loop,because req->subrequests() is 1,so iMaxVbsAllowed is 0.
Does anybody have some solutions?
TIA.
With regards,
Cheng Chaoting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20030512/8fe294dd/attachment.htm
More information about the AGENTPP
mailing list