Ver código fonte

Reported overflow prevention from pause detection to bad network detection code

tags/v1.2.0
Bertrand Lemasle 7 anos atrás
pai
commit
70db8ae6e4
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      GpsTracker/NetworkPositionsBackup.cpp

+ 1
- 1
GpsTracker/NetworkPositionsBackup.cpp Ver arquivo

@@ -64,7 +64,7 @@ namespace positions {
networkStatus = network::waitForRegistered(networkTimeout);

if (!network::isAvailable(networkStatus.stat) || !network::enableGprs()) {
networkUnavailableInARow++;
networkUnavailableInARow = min(networkUnavailableInARow + 1, POSITIONS_CONFIG_NET_DEFAULT_UNAVAILABLE_NETWORK_POSTPONE_THRESHOLD + 1); //avoid increment overflow
NOTICE_MSG("appendPositions", "network or gprs unavailable");

if (networkUnavailableInARow > POSITIONS_CONFIG_NET_DEFAULT_UNAVAILABLE_NETWORK_POSTPONE_THRESHOLD) {


Carregando…
Cancelar
Salvar