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 <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2022-03-14 22:04:02 +08:00 committed by Anas Nashif
commit edcf929b37

View file

@ -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[])