mobile: Use bool to show started can only be true or false
The state handling is complicated and maybe it gets better by moving started to bool and then the rest to an enum. Change-Id: I6aef22e7bf954a8a4ecda980c2c558eb8c9180b7
This commit is contained in:
parent
42888ed947
commit
65774d447d
|
@ -62,7 +62,8 @@ struct osmocom_ms {
|
|||
uint16_t test_arfcn;
|
||||
struct osmol1_entity l1_entity;
|
||||
|
||||
uint8_t deleting, shutdown, started;
|
||||
bool started, deleting;
|
||||
uint8_t shutdown;
|
||||
struct gsm_support support;
|
||||
struct gsm_settings settings;
|
||||
struct gsm_subscriber subscr;
|
||||
|
|
|
@ -131,7 +131,7 @@ int mobile_signal_cb(unsigned int subsys, unsigned int signal,
|
|||
gsm322_cs_sendmsg(ms, nmsg);
|
||||
}
|
||||
|
||||
ms->started = 1;
|
||||
ms->started = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ int mobile_init(struct osmocom_ms *ms)
|
|||
gsm_random_imei(&ms->settings);
|
||||
|
||||
ms->shutdown = 0;
|
||||
ms->started = 0;
|
||||
ms->started = false;
|
||||
|
||||
if (!strcmp(ms->settings.imei, "000000000000000")) {
|
||||
LOGP(DMOB, LOGL_NOTICE, "***\nWarning: Mobile '%s' has default IMEI: %s\n",
|
||||
|
@ -291,7 +291,7 @@ int mobile_delete(struct osmocom_ms *ms, int force)
|
|||
{
|
||||
int rc;
|
||||
|
||||
ms->deleting = 1;
|
||||
ms->deleting = true;
|
||||
|
||||
if (mncc_recv_app) {
|
||||
mncc_sock_exit(ms->mncc_entity.sock_state);
|
||||
|
|
Loading…
Reference in New Issue