Skip to content

Commit ac9b882

Browse files
author
Teppo Järvelin
committed
Fixed bug in state machine registaring phase.
1 parent 6f3eebc commit ac9b882

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

features/cellular/easy_cellular/CellularConnectionFSM.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace mbed
4242
CellularConnectionFSM::CellularConnectionFSM() :
4343
_serial(0), _state(STATE_INIT), _next_state(_state), _status_callback(0), _event_status_cb(0), _network(0), _power(0), _sim(0),
4444
_queue(8 * EVENTS_EVENT_SIZE), _queue_thread(0), _cellularDevice(0), _retry_count(0), _event_timeout(-1),
45-
_at_queue(8 * EVENTS_EVENT_SIZE), _eventID(0), _auto_registration(false)
45+
_at_queue(8 * EVENTS_EVENT_SIZE), _eventID(0)
4646
{
4747
memset(_sim_pin, 0, sizeof(_sim_pin));
4848
#if MBED_CONF_CELLULAR_RANDOM_MAX_START_DELAY == 0
@@ -294,16 +294,11 @@ const char* CellularConnectionFSM::get_state_string(CellularState state)
294294

295295
nsapi_error_t CellularConnectionFSM::is_automatic_registering(bool& auto_reg)
296296
{
297-
if (_auto_registration == CellularNetwork::NWModeAutomatic) {
298-
auto_reg = _auto_registration;
299-
return NSAPI_ERROR_OK;
300-
}
301297
CellularNetwork::NWRegisteringMode mode;
302298
nsapi_error_t err = _network->get_network_registering_mode(mode);
303299
if (err == NSAPI_ERROR_OK) {
304-
tr_info("automatic registering mode: %d", mode);
305-
_auto_registration = (mode == CellularNetwork::NWModeAutomatic);
306-
auto_reg = _auto_registration;
300+
tr_debug("automatic registering mode: %d", mode);
301+
auto_reg = (mode == CellularNetwork::NWModeAutomatic);
307302
}
308303
return err;
309304
}

features/cellular/easy_cellular/CellularConnectionFSM.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ class CellularConnectionFSM
196196
events::EventQueue _at_queue;
197197
char _st_string[20];
198198
int _eventID;
199-
bool _auto_registration;
200199
};
201200

202201
} // namespace

0 commit comments

Comments
 (0)