The following patch has been verified (see thread started sep 4) to fix
the problem. It is definitely AIX only :-)
diff --git a/include/net-snmp/library/snmp_transport.h
b/include/net-snmp/library/snmp_transport.h
index 5714a9b..4162897 100644
--- a/include/net-snmp/library/snmp_transport.h
+++
You are very much right sir, Ignoring warnings and error values can give
troubles.
Its working !! with pclose(pipe); only..thank you so much sir...
--
Live Security Virtual Conference
Exclusive live event will cover al
On 12 September 2012 10:02, Jatin Bodarya wrote:
> But the issue is with popen(); call... when I am using SNMPWALK
> command to get value it is working perfectly and returning me correct
> value... but only 10-15 time... then after popen fails !
Have you considered closing the pipe a
int temp()
{
FILE *pipe = NULL;
pipe=popen("/home/jatin/net-snmp-5.7.2.rc1/agent/mibgroup/cpu.sh","r");
if(!pipe)
{
snmp_log(LOG_ERR, "popen failed in temp(), errno: %d\n", errno);
return -1;
}
Thank you Sir,
But the issue is with popen
Hi Jatin!
I don't know much about SNMP but your problem might come from your function
temp.
What exactly is temp returning if popen or fscanf fails? There is no return
statement in these pathes. So the function might return anything. Probably 0.
I would return a specific value, so that you can