]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3432] - refclocks that 'write()' should check the result
authorJuergen Perlinger <perlinger@ntp.org>
Sat, 7 Apr 2018 11:54:34 +0000 (13:54 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Sat, 7 Apr 2018 11:54:34 +0000 (13:54 +0200)
 - sidekick: unchecked write in async resover code

bk: 5ac8b17a-FbQY-zAHyPdx0RfVfvsrQ

libntp/work_thread.c

index 433290c4c9a7ad39aa3dc588b195caf32bd644c3..41a8e6e960831ac4ae4a72edd8b930d9f5882970 100644 (file)
@@ -373,8 +373,10 @@ send_blocking_resp_internal(
        /* queue consumer wake-up notification */
        if (empty)
        {
-#          ifdef WORK_PIPE
-               write(c->resp_write_pipe, "", 1);
+#          ifdef WORK_PIPE             
+               if (1 != write(c->resp_write_pipe, "", 1))
+                       msyslog(LOG_ERR, "%s",
+                               "async resolver notifation failed");
 #          else
                tickle_sem(c->responses_pending);
 #          endif