ntpclient: fix NTP daemon state in case of DNS failure

This commit is contained in:
Pierre-Olivier Vauboin 2020-09-14 14:15:43 +02:00 committed by Xiang Xiao
parent 18137c0fec
commit bd537f286d

View File

@ -383,6 +383,9 @@ static int ntpc_daemon(int argc, char **argv)
{
nerr("ERROR: Failed to resolve '%s'\n",
CONFIG_NETUTILS_NTPCLIENT_SERVER);
g_ntpc_daemon.state = NTP_STOPPED;
sem_post(&g_ntpc_daemon.sync);
return EXIT_FAILURE;
}
#endif