From: Harlan Stenn Date: Fri, 24 Apr 2015 05:25:50 +0000 (-0400) Subject: refclock_true.c true_debug() can't open debug log because of incompatible open/fdopen... X-Git-Tag: NTP_4_3_18~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd10ddf528fb3decd6a23b39e8a5b4c49d8a9556;p=thirdparty%2Fntp.git refclock_true.c true_debug() can't open debug log because of incompatible open/fdopen parameters bk: 5539d3devZyFxjwetRB6WgWI2f65jg --- diff --git a/ChangeLog b/ChangeLog index de60ac5a8..39d5c23af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ --- * [Bug 2794] Clean up kernel clock status reports. +* [Bug 2800] refclock_true.c true_debug() can't open debug log because + of incompatible open/fdopen parameters. * [Bug 2804] install-local-data assumes GNU 'find' semantics. * [Bug 2808] GPSD_JSON driver enhancements, step 1. Various improvements, see http://bugs.ntp.org/2808 for details. diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c index 7a5c491bb..67ba6dfbe 100644 --- a/ntpd/refclock_true.c +++ b/ntpd/refclock_true.c @@ -240,7 +240,7 @@ true_debug(struct peer *peer, const char *fmt, ...) "/tmp/true%d.debug", up->unit); fd = open(filename, O_CREAT | O_WRONLY | O_EXCL, 0600); - if (fd >= 0 && (up->debug = fdopen(fd, "r+"))) { + if (fd >= 0 && (up->debug = fdopen(fd, "w"))) { #ifdef HAVE_SETVBUF static char buf[BUFSIZ];