[Nagiosplug-checkins] nagiosplug/plugins check_snmp.c,1.70,1.71

Thomas Guyot dermoth at users.sourceforge.net
Tue May 29 06:25:26 CEST 2007


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26149

Modified Files:
	check_snmp.c 
Log Message:
change a bunch of whitespaces (no code was harmed)


Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- check_snmp.c	15 Apr 2007 06:44:45 -0000	1.70
+++ check_snmp.c	29 May 2007 04:25:24 -0000	1.71
@@ -184,13 +184,13 @@
 	/* create the command line to execute */
 		if(usesnmpgetnext == TRUE) {
 		asprintf(&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
-				    PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
-						authpriv, server_address, port, oid);
+			PATH_TO_SNMPGETNEXT, timeout_interval, retries, miblist, proto,
+			authpriv, server_address, port, oid);
 	}else{
 
 		asprintf (&command_line, "%s -t %d -r %d -m %s -v %s %s %s:%s %s",
-	          PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
-	          authpriv, server_address, port, oid);
+			PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
+			authpriv, server_address, port, oid);
 	}
 	
 	if (verbose)
@@ -343,11 +343,11 @@
 		/* Prepend a label for this OID if there is one */
 		if (nlabels > (size_t)1 && (size_t)i < nlabels && labels[i] != NULL)
 			asprintf (&outbuff, "%s%s%s %s%s%s", outbuff,
-			          (i == 0) ? " " : output_delim,
-			          labels[i], mark (iresult), show, mark (iresult));
+				(i == 0) ? " " : output_delim,
+				labels[i], mark (iresult), show, mark (iresult));
 		else
 			asprintf (&outbuff, "%s%s%s%s%s", outbuff, (i == 0) ? " " : output_delim,
-			          mark (iresult), show, mark (iresult));
+				mark (iresult), show, mark (iresult));
 
 		/* Append a unit string for this OID if there is one */
 		if (nunits > (size_t)0 && (size_t)i < nunits && unitv[i] != NULL)
@@ -365,9 +365,9 @@
 
 	if (found == 0)
 		die (STATE_UNKNOWN,
-		     _("%s problem - No data received from host\nCMD: %s\n"),
-		     label,
-		     command_line);
+			_("%s problem - No data received from host\nCMD: %s\n"),
+			label,
+			command_line);
 
 	/* WARNING if output found on stderr */
 	if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
@@ -466,31 +466,31 @@
 		case 'H':									/* Host or server */
 			server_address = optarg;
 			break;
-		case 'p':       /* TCP port number */
+		case 'p':	/* TCP port number */
 			port = optarg;
 			break;
-		case 'm':      /* List of MIBS  */
+		case 'm':	/* List of MIBS  */
 			miblist = optarg;
 			break;
-		case 'n':     /* usesnmpgetnext */
+		case 'n':	/* usesnmpgetnext */
 			usesnmpgetnext = TRUE;
 			break;
-		case 'P':     /* SNMP protocol version */
+		case 'P':	/* SNMP protocol version */
 			proto = optarg;
 			break;
-		case 'L':     /* security level */
+		case 'L':	/* security level */
 			seclevel = optarg;
 			break;
-		case 'U':     /* security username */
+		case 'U':	/* security username */
 			secname = optarg;
 			break;
-		case 'a':     /* auth protocol */
+		case 'a':	/* auth protocol */
 			authproto = optarg;
 			break;
-		case 'A':     /* auth passwd */
+		case 'A':	/* auth passwd */
 			authpasswd = optarg;
 			break;
-		case 'X':     /* priv passwd */
+		case 'X':	/* priv passwd */
 			privpasswd = optarg;
 			break;
 		case 't':	/* timeout period */
@@ -701,14 +701,14 @@
 	
 	 
 	
-	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {        /* default protocol version */
+	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {	/* default protocol version */
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 	}
-	else if ( strcmp (proto, "2c") == 0 ) {                 /* snmpv2c args */
+	else if ( strcmp (proto, "2c") == 0 ) {		/* snmpv2c args */
 		asprintf(&authpriv, "%s%s", "-c ", community);
 	}
-	else if ( strcmp (proto, "3") == 0 ) {                 /* snmpv3 args */
+	else if ( strcmp (proto, "3") == 0 ) {		/* snmpv3 args */
 		asprintf(&proto, "%s", "3");
 		
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {





More information about the Commits mailing list