Oops, fixed some signed/unsigned comparisons
This commit is contained in:
@@ -556,7 +556,7 @@ protected:
|
|||||||
}
|
}
|
||||||
int len = stream.readStringUntil('\n').toInt();
|
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
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
|
||||||
}
|
}
|
||||||
waitResponse();
|
waitResponse();
|
||||||
|
@@ -645,7 +645,7 @@ protected:
|
|||||||
streamSkipUntil(','); // skip port
|
streamSkipUntil(','); // skip port
|
||||||
streamSkipUntil(','); // skip connection type (TCP/UDP)
|
streamSkipUntil(','); // skip connection type (TCP/UDP)
|
||||||
int len = stream.readStringUntil('\n').toInt(); // read length
|
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
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
|
||||||
sockets[mux]->sock_available--;
|
sockets[mux]->sock_available--;
|
||||||
// ^^ One less character available after moving from modem's FIFO to our FIFO
|
// ^^ One less character available after moving from modem's FIFO to our FIFO
|
||||||
|
@@ -646,7 +646,7 @@ protected:
|
|||||||
streamSkipUntil(','); // skip port
|
streamSkipUntil(','); // skip port
|
||||||
streamSkipUntil(','); // skip connection type (TCP/UDP)
|
streamSkipUntil(','); // skip connection type (TCP/UDP)
|
||||||
int len = stream.readStringUntil('\n').toInt(); // read length
|
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
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
|
||||||
sockets[mux]->sock_available--;
|
sockets[mux]->sock_available--;
|
||||||
// ^^ One less character available after moving from modem's FIFO to our FIFO
|
// ^^ One less character available after moving from modem's FIFO to our FIFO
|
||||||
|
@@ -660,7 +660,9 @@ protected:
|
|||||||
return false;
|
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
|
// Establish a connection in multi-socket mode
|
||||||
uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000;
|
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
|
// ^^ Requested number of data bytes (1-1460 bytes)to be read
|
||||||
int len_confirmed = stream.readStringUntil('\n').toInt();
|
int len_confirmed = stream.readStringUntil('\n').toInt();
|
||||||
// ^^ The data length which not read in the buffer
|
// ^^ 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();
|
uint32_t startMillis = millis();
|
||||||
#ifdef TINY_GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
||||||
|
@@ -865,7 +865,7 @@ protected:
|
|||||||
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
|
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
|
||||||
// 0 indicates that no data can be read.
|
// 0 indicates that no data can be read.
|
||||||
// This is actually be the number of bytes that will be remaining after the 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();
|
uint32_t startMillis = millis();
|
||||||
#ifdef TINY_GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
||||||
|
@@ -712,7 +712,7 @@ protected:
|
|||||||
// ^^ Requested number of data bytes (1-1460 bytes)to be read
|
// ^^ Requested number of data bytes (1-1460 bytes)to be read
|
||||||
int len_confirmed = stream.readStringUntil('\n').toInt();
|
int len_confirmed = stream.readStringUntil('\n').toInt();
|
||||||
// ^^ The data length which not read in the buffer
|
// ^^ 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();
|
uint32_t startMillis = millis();
|
||||||
#ifdef TINY_GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
||||||
|
@@ -845,7 +845,7 @@ protected:
|
|||||||
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
|
// ^^ Confirmed number of data bytes to be read, which may be less than requested.
|
||||||
// 0 indicates that no data can be read.
|
// 0 indicates that no data can be read.
|
||||||
// This is actually be the number of bytes that will be remaining after the 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();
|
uint32_t startMillis = millis();
|
||||||
#ifdef TINY_GSM_USE_HEX
|
#ifdef TINY_GSM_USE_HEX
|
||||||
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
while (stream.available() < 2 && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); }
|
||||||
|
@@ -622,7 +622,7 @@ protected:
|
|||||||
int len = stream.readStringUntil(',').toInt();
|
int len = stream.readStringUntil(',').toInt();
|
||||||
streamSkipUntil('\"');
|
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
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
|
||||||
}
|
}
|
||||||
streamSkipUntil('\"');
|
streamSkipUntil('\"');
|
||||||
|
@@ -625,7 +625,7 @@ protected:
|
|||||||
}
|
}
|
||||||
streamSkipUntil(','); // Skip mux
|
streamSkipUntil(','); // Skip mux
|
||||||
int len = stream.readStringUntil('\n').toInt();
|
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(); \
|
uint32_t startMillis = millis(); \
|
||||||
while (!stream.available() && ((millis() - startMillis) < sockets[mux % TINY_GSM_MUX_COUNT]->_timeout)) { TINY_GSM_YIELD(); } \
|
while (!stream.available() && ((millis() - startMillis) < sockets[mux % TINY_GSM_MUX_COUNT]->_timeout)) { TINY_GSM_YIELD(); } \
|
||||||
char c = stream.read(); \
|
char c = stream.read(); \
|
||||||
|
@@ -609,7 +609,7 @@ protected:
|
|||||||
int len = stream.readStringUntil(',').toInt();
|
int len = stream.readStringUntil(',').toInt();
|
||||||
streamSkipUntil('\"');
|
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
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT
|
||||||
}
|
}
|
||||||
streamSkipUntil('\"');
|
streamSkipUntil('\"');
|
||||||
|
Reference in New Issue
Block a user