]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
refclock_palisade.c, ChangeLog:
authorHal Murray <murray@ntp.org>
Tue, 15 Sep 2009 17:08:48 +0000 (13:08 -0400)
committerHal Murray <murray@ntp.org>
Tue, 15 Sep 2009 17:08:48 +0000 (13:08 -0400)
  Fix for bug 1310

bk: 4aafca20avY7jSMWMi7S9pbbEG5nbg

ChangeLog
ntpd/refclock_palisade.c

index e5d1e27190afcca59bd1bb4030648cbb575a2170..b52342e3b6bcb9071551cc4c56d2e9c28e95fc78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1310] fix Thunderbolt mode in refclock_palisade.c
 * [Bug 983] add interface [listen | ignore | drop] ... directive.
 * [Bug 1243] MD5auth_setkey zero-fills key from first zero octet.
 * [Bug 1295] leftover fix, do not crash on exit in free_config_trap()
index f00495184929120107c37a9b599ddcc3fac44be7..2eb220acf18bc3914236fb63de6db4c8da129174 100644 (file)
@@ -215,19 +215,22 @@ init_thunderbolt (
        int fd
        )
 {
-       struct packettx buf;
-       
-/*     buf.data = (u_char *) malloc(1); */
+       struct packettx tx;
        
+       tx.size = 0;
+       tx.data = (u_char *) malloc(100);
+
        /* set UTC time */
-       sendsupercmd (&buf, 0x8E, 0xA2);
-       sendbyte     (&buf, 0x3);
-       sendetx      (&buf, fd);
+       sendsupercmd (&tx, 0x8E, 0xA2);
+       sendbyte     (&tx, 0x3);
+       sendetx      (&tx, fd);
        
        /* activate packets 0x8F-AB and 0x8F-AC */
-       sendsupercmd (&buf, 0x8F, 0xA5);
-       sendint      (&buf, 0x5);
-       sendetx      (&buf, fd);
+       sendsupercmd (&tx, 0x8F, 0xA5);
+       sendint      (&tx, 0x5);
+       sendetx      (&tx, fd);
+
+       free(tx.data);
 }
 
 /*