Fixed braindead failure - Increase of NETWORK_BUFFER_MAX_SIZE > 9999 means to also increase NETWORK_BUFFER_LENGTH_DIGITS to 5.

* Fixed ARM32 xcompile warnings; Other GCC versions, other uint64_t's..
 * Replaced ridiculous nDPIsrvd_JSON_BYTES with NETWORK_BUFFER_LENGTH_DIGITS.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2021-01-27 17:53:18 +01:00
parent 9564b0ce2c
commit 257cce1dcc
8 changed files with 40 additions and 38 deletions

View File

@@ -57,11 +57,11 @@ int main(void)
}
buf_used += bytes_read;
while (buf_used >= nDPIsrvd_JSON_BYTES + 1)
while (buf_used >= NETWORK_BUFFER_LENGTH_DIGITS + 1)
{
if (buf[nDPIsrvd_JSON_BYTES] != '{')
if (buf[NETWORK_BUFFER_LENGTH_DIGITS] != '{')
{
fprintf(stderr, "BUG: JSON invalid opening character: '%c'\n", buf[nDPIsrvd_JSON_BYTES]);
fprintf(stderr, "BUG: JSON invalid opening character: '%c'\n", buf[NETWORK_BUFFER_LENGTH_DIGITS]);
exit(1);
}
@@ -77,7 +77,7 @@ int main(void)
}
if ((uint8_t *)json_str_start == buf)
{
fprintf(stderr, "BUG: Missing size before JSON string: \"%.*s\"\n", nDPIsrvd_JSON_BYTES, buf);
fprintf(stderr, "BUG: Missing size before JSON string: \"%.*s\"\n", NETWORK_BUFFER_LENGTH_DIGITS, buf);
exit(1);
}
if (json_bytes > sizeof(buf))