Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_network_registering_m
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_DEVICE_ERROR;
mode = CellularNetwork::NWModeManual;
EXPECT_TRUE(NSAPI_ERROR_DEVICE_ERROR == cn.get_network_registering_mode(mode));
EXPECT_TRUE(mode == -1);
EXPECT_TRUE(mode == CellularNetwork::NWModeManual);
}

TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_set_registration_urc)
Expand Down
2 changes: 1 addition & 1 deletion features/cellular/framework/API/CellularNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class CellularNetwork {

/** Get the current network registering mode
*
* @param mode on successful return contains the current network registering mode
* @param mode on success the current network registering mode, otherwise unchanged
* @return NSAPI_ERROR_OK on success
* NSAPI_ERROR_DEVICE_ERROR on failure
*/
Expand Down
4 changes: 3 additions & 1 deletion features/cellular/framework/AT/AT_CellularNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ nsapi_error_t AT_CellularNetwork::get_network_registering_mode(NWRegisteringMode
{
int ret;
nsapi_error_t error = _at.at_cmd_int("+COPS", "?", ret);
mode = (NWRegisteringMode)ret;
if (error == NSAPI_ERROR_OK) {
mode = (NWRegisteringMode)ret;
}
return error;
}

Expand Down