CFV: Fix for "hidden" CMSG_xxx macros on AIX

2012-09-12 Thread Niels Baggesen
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 +++

RE: net-snmp agent problem

2012-09-12 Thread Jatin Bodarya
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

Re: net-snmp agent problem

2012-09-12 Thread Dave Shield
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

RE: net-snmp agent problem

2012-09-12 Thread Jatin Bodarya
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

RE: net-snmp agent problem

2012-09-12 Thread Schmoll Walter
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