Q:Table prepare set
manjunath ramaiah
manjunath.ramaiah____wipro.com
Fri Jun 16 16:28:42 CEST 2000
Hi ,
I want to add a row if it is not present already . I have overridden
the mibtable prepare_set function as follows
int iprouteEntry::prepare_set_request(Request* req, int& ind)
{
//This class is derived from mibtable
char chTempIndex[50] ;
int nRetValue ;
printf("entry called \n");
nRetValue = MibTable::prepare_set_request(req,ind);
if ( nRetValue == SNMP_ERROR_NO_CREATION )
{
// Means this is new row , so add row.
strcpy( chTempIndex, ( ( iprouteEntry::instance->index(
req->get_oid(ind
))).get_printable()));
Oidx x( (char * )chTempIndex);
MibTable::start_synch();
iprouteEntry::instance->add_row( x );
MibTable::end_synch();
printf("row added %s\n",chTempIndex);
return SNMP_ERROR_SUCCESS;
}
// else the row is already present
return nRetValue ;
}
I have overridden the preprare_set functions of all the coumns of the
table .
Basicaly this is a ipTable .
Now the problem is , if the new row is added the control is not coming
to the
prepare_set of the the first column of the table. It is coming to the 2
coulmns
prepare_set .
If the row is present then it is fine .
Pls help me in solving this .
Thanks in advance,
Manjunath
More information about the AGENTPP
mailing list