summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Erickson <marathon96@gmail.com>2012-07-16 09:47:59 -0700
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-07-17 10:13:02 +0200
commit19116c1505384f3ee47626474f73cd458008055f (patch)
treee7f6711bd9eccb980f10f977e6d2de143962e972
parenta8edee9468a2848f83f859e7ae3945b282867d50 (diff)
downloadconnman-19116c1505384f3ee47626474f73cd458008055f.tar.gz
connman-19116c1505384f3ee47626474f73cd458008055f.tar.bz2
connman-19116c1505384f3ee47626474f73cd458008055f.zip
ntp: Use mnemonics rather than magic numbers
Convert a magic number into equivalent mnemonics for the flags (leap, version, mode) packet field.
-rw-r--r--src/ntp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntp.c b/src/ntp.c
index 75556180..c7224a88 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);
msg.poll = 4; // min
msg.poll = 10; // max
msg.xmttime.seconds = random();