Oops, fixed some signed/unsigned comparisons

This commit is contained in:
Sara Damiano
2019-09-05 13:23:46 -04:00
parent 05bee3294a
commit 6c0ec95a7e
10 changed files with 13 additions and 11 deletions

View File

@@ -556,7 +556,7 @@ protected:
}
int len = stream.readStringUntil('\n').toInt();
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
}
waitResponse();

View File

@@ -645,7 +645,7 @@ protected:
streamSkipUntil(','); // skip port
streamSkipUntil(','); // skip connection type (TCP/UDP)
int len = stream.readStringUntil('\n').toInt(); // read length
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
sockets[mux]->sock_available--;
// ^^ One less character available after moving from modem's FIFO to our FIFO

View File

@@ -646,7 +646,7 @@ protected:
streamSkipUntil(','); // skip port
streamSkipUntil(','); // skip connection type (TCP/UDP)
int len = stream.readStringUntil('\n').toInt(); // read length
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
sockets[mux]->sock_available--;
// ^^ One less character available after moving from modem's FIFO to our FIFO

View File

@@ -660,7 +660,9 @@ protected:
return false;
}
if (ssl) DBG("SSL not yet supported on this module!");
if (ssl) {
DBG("SSL not yet supported on this module!");
}
// Establish a connection in multi-socket mode
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
@@ -706,7 +708,7 @@ protected:
// ^^ Requested number of data bytes (1-1460 bytes)to be read
int len_confirmed = stream.readStringUntil('\n').toInt();
// ^^ The data length which not read in the buffer
for (size_t i=0; i<len_requested; i++) {
for (int i=0; i<len_requested; i++) {
uint32_t startMillis = millis();
#ifdef TINY_GSM_USE_HEX
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }

View File

@@ -865,7 +865,7 @@ protected:
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
// 0 indicates that no data can be read.
// This is actually be the number of bytes that will be remaining after the read
for (size_t i=0; i<len_requested; i++) {
for (int i=0; i<len_requested; i++) {
uint32_t startMillis = millis();
#ifdef TINY_GSM_USE_HEX
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }

View File

@@ -712,7 +712,7 @@ protected:
// ^^ Requested number of data bytes (1-1460 bytes)to be read
int len_confirmed = stream.readStringUntil('\n').toInt();
// ^^ The data length which not read in the buffer
for (size_t i=0; i<len_requested; i++) {
for (int i=0; i<len_requested; i++) {
uint32_t startMillis = millis();
#ifdef TINY_GSM_USE_HEX
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }

View File

@@ -845,7 +845,7 @@ protected:
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
// 0 indicates that no data can be read.
// This is actually be the number of bytes that will be remaining after the read
for (size_t i=0; i<len_requested; i++) {
for (int i=0; i<len_requested; i++) {
uint32_t startMillis = millis();
#ifdef TINY_GSM_USE_HEX
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }

View File

@@ -622,7 +622,7 @@ protected:
int len = stream.readStringUntil(',').toInt();
streamSkipUntil('\"');
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
}
streamSkipUntil('\"');

View File

@@ -625,7 +625,7 @@ protected:
}
streamSkipUntil(','); // Skip mux
int len = stream.readStringUntil('\n').toInt();
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
uint32_t startMillis = millis(); \
while (!stream.available() && ((millis() - startMillis) < sockets[mux % TINY_GSM_MUX_COUNT]->_timeout)) { TINY_GSM_YIELD(); } \
char c = stream.read(); \

View File

@@ -609,7 +609,7 @@ protected:
int len = stream.readStringUntil(',').toInt();
streamSkipUntil('\"');
for (size_t i=0; i<len; i++) {
for (int i=0; i<len; i++) {
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
}
streamSkipUntil('\"');