Hi Grant,

On 07/13/2012 07:35 PM, Grant Erickson wrote:
Convert a magic number into equivalent mnemonics for the flags (leap,
version, mode) packet field.

---
  src/ntp.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ntp.c b/src/ntp.c
index 87017ed..f257cda 100644
--- a/src/ntp.c
+++ b/src/ntp.c
@@ -114,7 +114,7 @@ static void send_packet(int fd, const char *server)
        ssize_t len;

        memset(&msg, 0, sizeof(msg));
-       msg.flags = 0x23;
+       msg.flags = NTP_FLAGS_ENCODE(NTP_FLAG_LI_NOWARNING, 4, 
NTP_FLAG_MD_CLIENT);;

Double semicolon here

        msg.poll = 4;   // min
        msg.poll = 10;  // max
        msg.xmttime.seconds = random();



Cheers,
Jukka

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to