Displaying 2 results from an estimated 2 matches for "type_snmp".
2012 Sep 06
1
nut-scanner pthread issue
...le snmp part:
==============================
if( allow_snmp && nutscan_avail_snmp ) {
if( start_ip == NULL ) {
printq(quiet,"No start IP, skipping SNMP\n");
}
else {
printq(quiet,"Scanning SNMP bus.\n");
#ifdef HAVE_PTHREAD
if( pthread_create(&thread[TYPE_SNMP],NULL,run_snmp,&snmp_sec)) {
nutscan_avail_snmp = 0;
}
#else
dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&snmp_sec);
#endif /* HAVE_PTHREAD */
}
}
==============================
if start_ip==NULL, pthread is not created, but later...
if( allow_snmp && n...
2011 Jun 21
1
[nut-commits] svn commit r3048 - branches/nut-scanner/tools/nut-scanner
...==================================================
> --- branches/nut-scanner/tools/nut-scanner/scan_snmp.c Fri Jun 17
> 08:12:00 2011 (r3047)
> +++ branches/nut-scanner/tools/nut-scanner/scan_snmp.c Tue Jun 21
> 07:56:55 2011 (r3048)
> @@ -101,8 +101,12 @@
> dev->type = TYPE_SNMP;
> dev->driver = strdup("snmp-ups");
> dev->port = strdup(session->peername);
> - snprintf(buf,sizeof(buf),"\"%s\"",
> - response->variables->val.string);
> + /* get the name aof the device and add "" */
> + memse...