From: Wonsang Ryou Date: Tue, 18 Jul 2017 09:40:16 +0000 (+0900) Subject: netutils/ntpclient: make debug message option configurable in .config X-Git-Tag: 1.1_Public_Release~318^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46d74424dc0d7c79ce90e810061a6984502822ba;p=rtos%2Ftinyara.git netutils/ntpclient: make debug message option configurable in .config This patch enables ntpclient's debug message option to be configurable in .config. You can set debug message option using the following config variable. - CONFIG_NETUTILS_NTPCLIENT_DEBUG Change-Id: Idff252265478b6006fe1995ac33e094c097b03e1 Signed-off-by: Wonsang Ryou --- diff --git a/apps/netutils/ntpclient/Kconfig b/apps/netutils/ntpclient/Kconfig index c962f71..fc70f0d 100644 --- a/apps/netutils/ntpclient/Kconfig +++ b/apps/netutils/ntpclient/Kconfig @@ -24,4 +24,10 @@ config NETUTILS_NTPCLIENT_SIGWAKEUP default 18 depends on !DISABLE_SIGNALS +config NETUTILS_NTPCLIENT_DEBUG + bool "NTP client debug message option" + default n + ---help--- + Enable NTP client debug message + endif # NETUTILS_NTPCLIENT diff --git a/apps/netutils/ntpclient/ntpclient.c b/apps/netutils/ntpclient/ntpclient.c index 73377e5..931d5ee 100644 --- a/apps/netutils/ntpclient/ntpclient.c +++ b/apps/netutils/ntpclient/ntpclient.c @@ -85,7 +85,9 @@ #define NTP2UNIX_TRANLSLATION 2208988800u #define NTP_VERSION 3 -#define DEBUG_OPTION 0 +#ifndef CONFIG_NETUTILS_NTPCLIENT_DEBUG +#define CONFIG_NETUTILS_NTPCLIENT_DEBUG 0 +#endif /**************************************************************************** * Private Types @@ -118,7 +120,7 @@ void (*ntp_link_err_cb)(void); static struct ntpc_daemon_s g_ntpc_daemon; static struct ntpc_server_info_s g_ntps; -static int g_debug = DEBUG_OPTION; +static int g_debug = CONFIG_NETUTILS_NTPCLIENT_DEBUG; /**************************************************************************** * Private Functions Prototype