From edcf929b37120165d418d61ba75a1d046f226c22 Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Mon, 14 Mar 2022 22:04:02 +0800 Subject: [PATCH] samples: net: gsm: starting should be based on GSM_PPP_AUTOSTART The `starting` flag causes the sample to work only if GSM_PPP_AUTOSTART is enabled, its initial value should be dependent on GSM_PPP_AUTOSTART. Signed-off-by: Yong Cong Sin --- samples/net/gsm_modem/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/net/gsm_modem/src/main.c b/samples/net/gsm_modem/src/main.c index dc06462d940..49b8295480e 100644 --- a/samples/net/gsm_modem/src/main.c +++ b/samples/net/gsm_modem/src/main.c @@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(sample_gsm_ppp, LOG_LEVEL_DBG); static const struct device *gsm_dev; static struct net_mgmt_event_callback mgmt_cb; static bool connected; -static bool starting = true; +static bool starting = IS_ENABLED(CONFIG_GSM_PPP_AUTOSTART); static int cmd_sample_modem_suspend(const struct shell *shell, size_t argc, char *argv[])