mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-11-03 11:47:49 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user