diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 13:18:06 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 13:18:06 -0600 |
commit | 3900ca5789a408413a6e590683b4babe76ac7fad (patch) | |
tree | 228f5246dcea113238b5925775b9b9ccf8585238 /apps | |
parent | 74a4eb6d1612d63958e14a240cc526c9be8041e0 (diff) | |
download | nuttx-3900ca5789a408413a6e590683b4babe76ac7fad.tar.gz nuttx-3900ca5789a408413a6e590683b4babe76ac7fad.tar.bz2 nuttx-3900ca5789a408413a6e590683b4babe76ac7fad.zip |
Cosmetic changes for coding style; removal of dangling spaces at the end of lines
Diffstat (limited to 'apps')
-rw-r--r-- | apps/netutils/ntpclient/ntpclient.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/netutils/ntpclient/ntpclient.c b/apps/netutils/ntpclient/ntpclient.c index d27e4b2a5..d1714a46c 100644 --- a/apps/netutils/ntpclient/ntpclient.c +++ b/apps/netutils/ntpclient/ntpclient.c @@ -342,8 +342,20 @@ static int ntpc_daemon(int argc, char **argv) * assures both: (1) that there are no asynchronous stop requests and * (2) that we are not suspended while in critical moments when we about * to set the new time. This sounds harsh, but this function is suspended - * most of the time either: (1) send a datagram, (2) receiving a datagram, + * most of the time either: (1) sending a datagram, (2) receiving a datagram, * or (3) waiting for the next poll cycle. + * + * TODO: The first datagram that is sent is usually lost. That is because + * the MAC address of the NTP server is not in the ARP table. This is + * particularly bad here because the request will not be sent again until + * the long delay expires leaving the system with bad time for a long time + * initially. Solutions: + * + * 1. Fix send logic so that it assures that the ARP request has been + * sent and the entry is in the ARP table before sending the packet + * (best). + * 2. Add some ad hoc logic here so that there is no delay until at least + * one good time is received. */ sched_lock(); |