diff options
| -rw-r--r-- | plugins/check_tcp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 2714961f..0b87d687 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
| @@ -354,8 +354,13 @@ main (int argc, char **argv) | |||
| 354 | printf("Unexpected response from host/socket on "); | 354 | printf("Unexpected response from host/socket on "); |
| 355 | else | 355 | else |
| 356 | printf("%.3f second response time on ", elapsed_time); | 356 | printf("%.3f second response time on ", elapsed_time); |
| 357 | if(server_address[0] != '/') | 357 | if(server_address[0] != '/') { |
| 358 | printf("port %d", server_port); | 358 | if (host_specified) |
| 359 | printf("host %s and port %d", | ||
| 360 | server_address, server_port); | ||
| 361 | else | ||
| 362 | printf("port %d", server_port); | ||
| 363 | } | ||
| 359 | else | 364 | else |
| 360 | printf("socket %s", server_address); | 365 | printf("socket %s", server_address); |
| 361 | } | 366 | } |
