zhhyu7 opened a new pull request, #4199:
URL: https://github.com/apache/nuttx-apps/pull/4199

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   - ntpcstart takes an optional ';'-separated server list and passes it to
     ntpc_start_with_list(); without an argument it keeps using the DHCP or
     Kconfig servers as before.  The "Starting NTP client... / Using NTP
     servers: ..." banner now shows the servers actually used.
   - ntpc_get_ntp_sample() moves its two NTP datagrams and two addresses
     (about 200 bytes) from the stack to the heap.
   
   ## Impact
   
   - ntpcstart without arguments behaves as before.
   - No Kconfig change.
   
   ## Testing
   
   sim:dynconns on the nuttx0 bridge, CONFIG_NETUTILS_NTPCLIENT_NUM_SAMPLES=2.
   A minimal SNTP responder runs on the host at 10.0.1.1:123; there is no
   DNS on this setup.
   
   This branch:
   
   ```
   ntpcstart 10.0.1.1
   Starting NTP client...
   Using NTP servers: 10.0.1.1
   NTP client started successfully (task ID: 9)
   NTP client is now running in the background
   nsh> ntpcstatus
   The number of last samples: 2
   [0] srv 10.0.1.1 offset -0.004840753 delay 0.009890216
   [1] srv 10.0.1.1 offset -0.004373742 delay 0.009000407
   nsh> ntpcstop
   Stopping NTP client...
   Stopped the NTP daemon
   ```
   
   apache/master ignores the argument and keeps resolving pool.ntp.org, so
   it never gets a sample here:
   
   ```
   ntpcstart 10.0.1.1
   Starting NTP client...
   Using NTP servers: 0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org
   NTP client started successfully (task ID: 9)
   NTP client is now running in the background
   nsh> ntpcstatus
   The number of last samples: 0
   ```
   
   checkpatch.sh -c -u -m -g passes for every commit.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to