Skip to content

Commit eb78ba6

Browse files
author
Antti Kauppila
committed
Fixed PDP type handling
1 parent 2fb167b commit eb78ba6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularContext.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ ControlPlane_netif *QUECTEL_BG96_CellularContext::get_cp_netif()
6969

7070
nsapi_error_t QUECTEL_BG96_CellularContext::do_user_authentication()
7171
{
72-
uint8_t type = 1;
73-
if ((uint8_t)_pdp_type > 1) {
74-
type = 2;
72+
uint8_t type = (uint8_t)_pdp_type;
73+
if ((uint8_t)_pdp_type < 1) {
74+
type = 1;
7575
}
76+
7677
if (_pwd && _uname) {
7778
if (_at.at_cmd_discard("+QICSGP", "=", "%d%d%s%s%s%d", _cid, type,
7879
_apn, _uname, _pwd, _authentication_type) != NSAPI_ERROR_OK) {

0 commit comments

Comments
 (0)