table_entry = (struct notePCTable_entry *) netsnmp_extract_iterator_context(request);
  table_info = netsnmp_extract_table_info(request)
           switch (table_info->colnum)
           {
                case COLUMN_NOTEPCNAME:
                 printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNAME \n");

break;
         case COLUMN_NOTEPCNUMBER:
          printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCNUMBER \n");
   NumberTemp=(int *)request->requestvb->val.integer;
       printf("\nNumberTemp=%d\n", NumberTemp);  
   //here is the problem, NumberTemp can not be printed properly.Maybe because it is integer, and if string, it is OK
         //I have tried "NumberTemp=(long *)request->requestvb-> val.integer;" the same error
break;
case COLUMN_NOTEPCUSER:
printf("\npeter--MODE_SET_RESERVE2--COLUMN_NOTEPCUSER \n");
strcpy(UserTemp, request->requestvb->val.string);//here notePCUser is string, so it is OK
break;

table_row = notePCTable_createEntry(table_info->indexes->val.string, NumberTemp, UserTemp);
netsnmp_insert_table_row(request, table_row);
 
 
Thank you for your help~


On 8/30/06, Dave Shield <[EMAIL PROTECTED]> wrote:
On 30/08/06, Zhang Chuan <[EMAIL PROTECTED]> wrote:
> I have gengerated the myTable.c and myTable.h by mib2c.iterate.conf
> automaticly. And I modified some code to make it can response to "set" or
> "get". But whenever I set a integer value to "myNumber" , the agent can not
> set the exactly value but a very large number.

So what is the code that you've got for handling the SET of myNumber?

Dave



--
you jump, I jump,she jump 3
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to