summaryrefslogtreecommitdiffstats
path: root/web/attachments/86257-patch-check_tcp-quiet
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/86257-patch-check_tcp-quiet')
-rw-r--r--web/attachments/86257-patch-check_tcp-quiet96
1 files changed, 96 insertions, 0 deletions
diff --git a/web/attachments/86257-patch-check_tcp-quiet b/web/attachments/86257-patch-check_tcp-quiet
new file mode 100644
index 0000000..b085f62
--- /dev/null
+++ b/web/attachments/86257-patch-check_tcp-quiet
@@ -0,0 +1,96 @@
1*** check_tcp.c.original Thu May 6 09:25:56 2004
2--- check_tcp.c Thu May 6 09:31:52 2004
3***************
4*** 84,89 ****
5--- 84,90 ----
6 int check_warning_time = FALSE;
7 double critical_time = 0;
8 int check_critical_time = FALSE;
9+ int hide_output = FALSE;
10 double elapsed_time = 0;
11 long microsec;
12 int verbose = FALSE;
13***************
14*** 329,335 ****
15 (was_refused) ? " (refused)" : "",
16 elapsed_time, server_port);
17
18! if (status && strlen(status) > 0)
19 printf (" [%s]", status);
20
21 printf (" |%s\n", perfdata ("time", microsec, "us",
22--- 330,336 ----
23 (was_refused) ? " (refused)" : "",
24 elapsed_time, server_port);
25
26! if (hide_output == FALSE && status && strlen(status) > 0)
27 printf (" [%s]", status);
28
29 printf (" |%s\n", perfdata ("time", microsec, "us",
30***************
31*** 364,369 ****
32--- 365,371 ----
33 {"expect", required_argument, 0, 'e'},
34 {"maxbytes", required_argument, 0, 'm'},
35 {"quit", required_argument, 0, 'q'},
36+ {"jail", required_argument, 0, 'j'},
37 {"delay", required_argument, 0, 'd'},
38 {"refuse", required_argument, 0, 'r'},
39 {"use-ipv4", no_argument, 0, '4'},
40***************
41*** 395,401 ****
42 }
43
44 while (1) {
45! c = getopt_long (argc, argv, "+hVv46H:s:e:q:m:c:w:t:p:C:W:d:Sr:",
46 longopts, &option);
47
48 if (c == -1 || c == EOF || c == 1)
49--- 397,403 ----
50 }
51
52 while (1) {
53! c = getopt_long (argc, argv, "+hVv46H:s:e:q:m:c:w:t:p:C:W:d:Sr:j",
54 longopts, &option);
55
56 if (c == -1 || c == EOF || c == 1)
57***************
58*** 437,442 ****
59--- 439,447 ----
60 critical_time = strtod (optarg, NULL);
61 check_critical_time = TRUE;
62 break;
63+ case 'j': /* hide output */
64+ hide_output = TRUE;
65+ break;
66 case 'w': /* warning */
67 if (!is_intnonneg (optarg))
68 usage (_("Warning threshold must be a nonnegative integer\n"));
69***************
70*** 622,627 ****
71--- 627,634 ----
72 printf (_("\
73 -r, --refuse=ok|warn|crit\n\
74 Accept tcp refusals with states ok, warn, crit (default: crit)\n\
75+ -j, --jail\n\
76+ Hide output from TCP socket\n\
77 -m, --maxbytes=INTEGER\n\
78 Close connection once more than this number of bytes are received\n\
79 -d, --delay=INTEGER\n\
80***************
81*** 646,652 ****
82 Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\
83 [-s <send string>] [-e <expect string>] [-q <quit string>]\n\
84 [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
85! [-r <refuse state>] [-v] [-4|-6]\n"), progname);
86 printf (" %s (-h|--help)\n", progname);
87 printf (" %s (-V|--version)\n", progname);
88 }
89--- 653,659 ----
90 Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\
91 [-s <send string>] [-e <expect string>] [-q <quit string>]\n\
92 [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\
93! [-r <refuse state>] [-v] [-4|-6] [-j]\n"), progname);
94 printf (" %s (-h|--help)\n", progname);
95 printf (" %s (-V|--version)\n", progname);
96 }