Regarding MibTable::commit_set_request

Cheng Chaoting chengchaoting____huawei.com
Wed Jul 9 03:14:25 CEST 2003


Hi Frank,

In my test example,before changing the mib table instance which is in memory,I should extract all these rows and insert them into database(or file),if successful,I will change the memory,otherwise,returning "SNMP_ERROR_COMITFAIL", but,if returning SNMP_ERROR_COMITFAIL,there is unhandled exception.

The demo code as the following:
int imap_northbound_common_hwIMAPNorthboundCommonManagerInformationEntry::commit_set_request(Request* req, int ind)
{
    if ( it is successful inserting into database )
        return MibTable::commit_set_request(req, ind);
    else
        return SNMP_ERROR_COMITFAIL; //if operation fault, then return SNMP_ERROR_COMITFAIL(example:delete operatetion)
}

I guess may be the reason is in the "mib.cpp"
int snmpRowStatus::unset()
{
   uint32 rs;
   rs = *(SnmpInt32*)undo; 
   //reason: if returning "SNMP_ERROR_COMITFAIL" ," undo" is null;then throw an exception;
    ...
}

Is it right,and how can i do?


Best regards,
Cheng Chaoting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20030709/a2485774/attachment.htm 


More information about the AGENTPP mailing list