diff options
Diffstat (limited to 'plugins/check_tcp.c')
| -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 ebdccd1b..bd7736b5 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
| @@ -353,8 +353,13 @@ main (int argc, char **argv) | |||
| 353 | printf("Unexpected response from host/socket on "); | 353 | printf("Unexpected response from host/socket on "); |
| 354 | else | 354 | else |
| 355 | printf("%.3f second response time on ", elapsed_time); | 355 | printf("%.3f second response time on ", elapsed_time); |
| 356 | if(server_address[0] != '/') | 356 | if(server_address[0] != '/') { |
| 357 | printf("port %d", server_port); | 357 | if (host_specified) |
| 358 | printf("%s port %d", | ||
| 359 | server_address, server_port); | ||
| 360 | else | ||
| 361 | printf("port %d", server_port); | ||
| 362 | } | ||
| 358 | else | 363 | else |
| 359 | printf("socket %s", server_address); | 364 | printf("socket %s", server_address); |
| 360 | } | 365 | } |
