Skip to content

Commit 45635e5

Browse files
committed
Deleting code which is problematic because the execution of the if trace depends on an uninitialized variable
1 parent da5e079 commit 45635e5

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/Arduino_NBConnectionHandler.cpp

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,9 @@ NetworkConnectionState NBConnectionHandler::check()
121121
changeConnectionState(NetworkConnectionState::ERROR);
122122
return _netConnectionState;
123123
}
124-
Debug.print(DBG_INFO, "Sending PING to outer space...");
125-
int pingResult;
126-
// pingResult = _nb_gprs.ping("time.arduino.cc");
127-
// Debug.print(DBG_INFO, "NB.ping(): %d", pingResult);
128-
// if (pingResult < 0) {
129-
if (pingResult < 0)
130-
{
131-
Debug.print(DBG_ERROR, "PING failed");
132-
Debug.print(DBG_INFO, "Retrying in \"%d\" milliseconds", connectionTickTimeInterval);
133-
return _netConnectionState;
134-
}
135-
else
136-
{
137-
Debug.print(DBG_INFO, "Connected to GPRS Network");
138-
changeConnectionState(NetworkConnectionState::CONNECTED);
139-
return _netConnectionState;
140-
}
124+
Debug.print(DBG_INFO, "Connected to GPRS Network");
125+
changeConnectionState(NetworkConnectionState::CONNECTED);
126+
return _netConnectionState;
141127
}
142128
break;
143129
case NetworkConnectionState::CONNECTED:

0 commit comments

Comments
 (0)