diff options
Diffstat (limited to 'plugins/check_ntp_peer.c')
-rw-r--r-- | plugins/check_ntp_peer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c index b5551ba8..3e518bc2 100644 --- a/plugins/check_ntp_peer.c +++ b/plugins/check_ntp_peer.c | |||
@@ -264,7 +264,8 @@ int ntp_request(const char *host, double *offset, int *offset_result, double *ji | |||
264 | /* Attempt to read the largest size packet possible */ | 264 | /* Attempt to read the largest size packet possible */ |
265 | req.count=htons(MAX_CM_SIZE); | 265 | req.count=htons(MAX_CM_SIZE); |
266 | DBG(printf("recieving READSTAT response")) | 266 | DBG(printf("recieving READSTAT response")) |
267 | read(conn, &req, SIZEOF_NTPCM(req)); | 267 | if(read(conn, &req, SIZEOF_NTPCM(req)) == -1) |
268 | die(STATE_CRITICAL, "NTP CRITICAL: No response from NTP server\n"); | ||
268 | DBG(print_ntp_control_message(&req)); | 269 | DBG(print_ntp_control_message(&req)); |
269 | /* Each peer identifier is 4 bytes in the data section, which | 270 | /* Each peer identifier is 4 bytes in the data section, which |
270 | * we represent as a ntp_assoc_status_pair datatype. | 271 | * we represent as a ntp_assoc_status_pair datatype. |