WebNMS Developer Forums
Click on Join Now to Sign Up
Cause of the Problem :
During compilation of files, the type char might have been set to unsigned by default and hence at run time when -1 value is assigned to char variable, it takes the value as 255.
1) In AgentCompiler, go to Settings -> C/C++ Compiler option.
2) In the Compiler -> Options field, add the option "-fsigned-char".
3) Click OK and generate the Source again.
4) Compile the generated file and start the Agent.
5) From MibBrowser, perform the Set/Get/GetNext querying.
So, the char will be set to signed. Now the char variable will be assigned the value -1 properly.
The above problem can also be solved by changing the following compile option:
"COMP_OPT=-c -g -Wall -O -O2 -o $@" to "COMP_OPT=-c -g -Wall -O -O2 -fsigned-char -o $@" in all the Makefiles present under the "agent, agent/source, agent/stubs" directories and their sub-directories. In this situation, it is enough to change the code snippet in the Makefile and start the compilation. There is no need for re-generating the source code again.
Hope this helps. Do revert back to us for further support.
Note : - This query was answered through our support yesterday . But today we received a delivery notification for the reply sent to you. We already resent the reply through our support response.
Thanks and Regards,
- subarayan -