mirror of https://github.com/ARMmbed/mbed-os.git
Fixed to call callback when connected...
parent
1dcc6684bf
commit
60f7054a45
|
@ -416,6 +416,11 @@ void CellularConnectionUtil::event()
|
|||
case STATE_CONNECTED:
|
||||
cellularDevice.set_timeout(TIMEOUT_NETWORK);
|
||||
log_debug("Cellular ready! (timeout %d ms)", TIMEOUT_NETWORK);
|
||||
if (_status_callback) {
|
||||
if (!_status_callback(_state, _next_state)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MBED_ASSERT(0);
|
||||
|
|
|
@ -146,5 +146,9 @@ const char *EasyCellularConnection::get_gateway()
|
|||
|
||||
NetworkStack *EasyCellularConnection::get_stack()
|
||||
{
|
||||
#if NSAPI_PPP_AVAILABLE
|
||||
return nsapi_ppp_get_stack();
|
||||
#else
|
||||
return NULL;//cellularConnection.get_network();
|
||||
#endif // #if NSAPI_PPP_AVAILABLE
|
||||
}
|
||||
|
|
|
@ -126,9 +126,8 @@ private:
|
|||
*/
|
||||
bool cellular_status(int state, int next_state);
|
||||
|
||||
|
||||
CellularConnectionUtil::CellularState _target_state;
|
||||
bool _is_connected;
|
||||
CellularConnectionUtil::CellularState _target_state;
|
||||
};
|
||||
|
||||
#endif // EASY_CELLULAR_CONNECTION_H
|
||||
|
|
Loading…
Reference in New Issue