Commit graph

10 commits

Author SHA1 Message Date
Deleted user
65151365c3 Merge de66e2b478 into b83c2629b9 2017-09-01 09:29:40 +00:00
funnydog
65a0c95b13 extras/sntp: fix an off-by-one bug in sntp_set_servers()
The function sntp_set_servers() duplicates the strings supplied in the
server_url[] array into new strings but forgets to allocate the extra
byte needed for the \0 terminator for each string.

Fix the problem by using strdup(), which allocates the right amount of
memory and copies the string at once.
2017-03-14 20:32:51 +01:00
iosen
de66e2b478 Use a mutex for synchronization. 2016-07-01 00:32:39 +10:00
iosen
59ee3d5975 sntp: fix the handling of the rtc counter wrapping
This reworks the accounting of the time to address the wrapping of the
rtc counter. It currently assumes that the time is accessed more
frequently than the counter would wrap. It also adds a semaphore to
synchronize access to the time storage.
2016-07-01 00:05:59 +10:00
iosen
37180024f4 sntp: free the pbuf after sending the request
Fixes a memory leak.
2016-06-26 21:36:04 +10:00
doragasu
11c9031d9b Removed my _time() implementation to use newlib provided one. 2016-03-31 16:05:15 +02:00
doragasu
9651692ca2 Cleanup and some changes to make implementation a bit more conforming to the standard. 2016-03-13 18:29:30 +01:00
doragasu
f14025b1c7 Removed non working clock_* calls from example. Using vars for tz and dst. 2016-03-13 17:04:03 +01:00
doragasu
0482aebf7d Added quick and dirty _gettimeofday_r() test implementation. 2016-03-11 13:11:15 +01:00
doragasu
16c831fffa Added sntp support and example 2016-03-09 17:18:51 +01:00