netutils/ntpclient: modify debug message options
This patch removes the local debug options on the following messages
- error messages of sendto() and recvfrom()
- 'Set time' message
The above messages will be always shown when CONFIG_DEBUG_NET_ERROR
is enabled.
@@ -289,10 +289,8 @@ static void ntpc_settime(FAR uint8_t *timestamp)
tp.tv_nsec = nsec;
clock_settime(CLOCK_REALTIME, &tp);
- if (g_debug) {
ndbg("Set time to %lu seconds\n", (unsigned long)tp.tv_sec);
}
-}
/****************************************************************************
* Name: ntpc_daemon
@@ -392,10 +390,8 @@ static int ntpc_daemon(int argc, char **argv)
int errval = errno;
if (errval != EINTR) {
- if (g_debug) {
ndbg("ERROR: sendto() failed (errno: %d)\n", errval);
}
- }
/* Go back to the top of the loop if we were interrupted
* by a signal. The signal might mean that we were
@@ -448,6 +444,7 @@ static int ntpc_daemon(int argc, char **argv)
int errval = errno;
if (errval != EINTR) {
+ ndbg("ERROR: recvfrom() failed (errno: %d)\n", errval);
if (g_debug) {
ndbg("ntp client cannot receive time information from ntp server.\n");
ndbg("maybe, ntp server is not connected.\n");
