diff --git a/features/cellular/framework/AT/AT_CellularContext.cpp b/features/cellular/framework/AT/AT_CellularContext.cpp index d29b058a0e..177e9d45a4 100644 --- a/features/cellular/framework/AT/AT_CellularContext.cpp +++ b/features/cellular/framework/AT/AT_CellularContext.cpp @@ -47,7 +47,7 @@ using namespace mbed; using namespace rtos; AT_CellularContext::AT_CellularContext(ATHandler &at, CellularDevice *device, const char *apn, bool cp_req, bool nonip_req) : - AT_CellularBase(at), _is_connected(false), _current_op(OP_INVALID), _fh(0), _cp_req(cp_req) + AT_CellularBase(at), _current_op(OP_INVALID), _fh(0), _cp_req(cp_req), _is_connected(false) { tr_info("New CellularContext %s (%p)", apn ? apn : "", this); _nonip_req = nonip_req; diff --git a/features/cellular/framework/AT/AT_CellularContext.h b/features/cellular/framework/AT/AT_CellularContext.h index 173a836a3c..5ccb5f2051 100644 --- a/features/cellular/framework/AT/AT_CellularContext.h +++ b/features/cellular/framework/AT/AT_CellularContext.h @@ -121,7 +121,6 @@ private: void do_disconnect(); void set_cid(int cid); private: - bool _is_connected; ContextOperation _current_op; FileHandle *_fh; rtos::Semaphore _semaphore; @@ -131,6 +130,7 @@ protected: char _found_apn[MAX_APN_LENGTH]; // flag indicating if CP was requested to be setup bool _cp_req; + bool _is_connected; }; } // namespace mbed