summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43571db)
raw | patch | inline | side by side (parent: 43571db)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 1 Aug 2009 03:35:50 +0000 (23:35 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 1 Aug 2009 03:35:50 +0000 (23:35 -0400) |
plugins/check_snmp.c | patch | blob | history |
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9096cdadcadaad29ffc7574cfb706ad61963d670..bb3d295e0f31fe0a14b822a7ccfeaf5f72648d1e 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
/* This is just for display purposes, so it can remain a string */
asprintf(&cl_hidden_auth, "%s -t %d -r %d -m %s -v %s %s %s:%s",
- snmpcmd, timeout_interval, retries, miblist, proto, "[authpriv]",
+ snmpcmd, timeout_interval, retries, strlen(miblist) ? miblist : "''", proto, "[authpriv]",
server_address, port);
for (i = 0; i < numoids; i++) {
oidname = strpcpy (oidname, ptr, delimiter);
response = strstr (ptr, delimiter);
if (verbose > 2) {
- printf("Processing line %i\n line: %s\n oidname: %s\n response: %s\n", i+1, ptr, oidname, response);
+ printf("Processing line %i\n oidname: %s\n response: %s\n", i+1, oidname, response);
}
/* We strip out the datatype indicator for PHBs */
if ( needmibs == TRUE ) {
miblist = strdup (DEFAULT_MIBLIST);
}else{
- miblist = "''"; /* don't read any mib files for numeric oids */
+ miblist = ""; /* don't read any mib files for numeric oids */
}
}