mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 14:07:17 +00:00
Merged in masayuki2009/nuttx.nuttx/network_test (pull request #376)
netdb: Fix time info in lib_dnscache.c Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
commit
4d5c1c7dba
1 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ void dns_save_answer(FAR const char *hostname,
|
|||
#if CONFIG_NETDB_DNSCLIENT_LIFESEC > 0
|
||||
/* Get the current time, using CLOCK_MONOTONIC if possible */
|
||||
|
||||
(void)clock_settime(DNS_CLOCK, &now);
|
||||
(void)clock_gettime(DNS_CLOCK, &now);
|
||||
entry->ctime = (time_t)now.tv_sec;
|
||||
#endif
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ int dns_find_answer(FAR const char *hostname, FAR struct sockaddr *addr,
|
|||
#if CONFIG_NETDB_DNSCLIENT_LIFESEC > 0
|
||||
/* Get the current time, using CLOCK_MONOTONIC if possible */
|
||||
|
||||
ret = clock_settime(DNS_CLOCK, &now);
|
||||
ret = clock_gettime(DNS_CLOCK, &now);
|
||||
#endif
|
||||
|
||||
/* REVISIT: This is not thread safe */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue