X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_snmp.c;h=b943379d4770bbc67d220ec258c9d6019f5abd9f;hb=831d03cd768cb4d1f96d3cabd6262a0a55f904e7;hp=a4be11bc64c648b3e7baeeed326155eb000117f2;hpb=3c6bec5c63e0bcb57d31ed6c0d1a62105aac299b;p=nagiosplug.git diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index a4be11b..b943379 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -301,6 +301,8 @@ main (int argc, char **argv) show = strstr (response, "Counter32: ") + 11; else if (strstr (response, "INTEGER: ")) show = strstr (response, "INTEGER: ") + 9; + else if (strstr (response, "STRING: ")) + show = strstr (response, "STRING: ") + 8; else show = response; p2 = show; @@ -420,7 +422,6 @@ process_arguments (int argc, char **argv) int c = 1; int j = 0, jj = 0, ii = 0; -#ifdef HAVE_GETOPT_H int option_index = 0; static struct option long_options[] = { STD_LONG_OPTS, @@ -445,7 +446,6 @@ process_arguments (int argc, char **argv) {"privpasswd", required_argument, 0, 'X'}, {0, 0, 0, 0} }; -#endif if (argc < 2) return ERROR; @@ -461,13 +461,8 @@ process_arguments (int argc, char **argv) } while (1) { -#ifdef HAVE_GETOPT_H - c = - getopt_long (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:", + c = getopt_long (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:", long_options, &option_index); -#else - c = getopt (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:"); -#endif if (c == -1 || c == EOF) break;