]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
refclock_true.c true_debug() can't open debug log because of incompatible open/fdopen...
authorHarlan Stenn <stenn@ntp.org>
Fri, 24 Apr 2015 05:25:50 +0000 (01:25 -0400)
committerHarlan Stenn <stenn@ntp.org>
Fri, 24 Apr 2015 05:25:50 +0000 (01:25 -0400)
bk: 5539d3devZyFxjwetRB6WgWI2f65jg

ChangeLog
ntpd/refclock_true.c

index de60ac5a8dc217a98d3ba0b6ada768685b79f97e..39d5c23af9c1282177a7ba5f66acf6fc3d2a8154 100644 (file)
--- 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.
index 7a5c491bb59514b53f5a8ee0b532813ec3a90833..67ba6dfbecceec77442a105e57b0eeed1d66aa36 100644 (file)
@@ -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];