TLS layer: c->rtls to optimise recvd TLS data

This commit is contained in:
cpq authored and Sergey Lyubka committed 2023-12-10 12:18:07 +00:00
1 parent 98d877c5f0
commit 144c2f443e
12 files changed
+248 -120

No files matched your search

+1 -1
View File
@@ -3136,7 +3136,7 @@ static void producer(void *param) {
size_t len, ofs = sizeof(tmp);
for (s_out = 0; s_out < NMESSAGES; s_out++) {
if (ofs >= sizeof(tmp)) mg_random(tmp, sizeof(tmp)), ofs = 0;
len = ((uint8_t *) tmp)[ofs] % 55 + 1;
len = ((uint8_t *) tmp)[ofs] % 55U + 1U;
if (ofs + len > sizeof(tmp)) len = sizeof(tmp) - ofs;
while ((mg_queue_book(q, &buf, len)) < len) (void) 0;
memcpy(buf, &tmp[ofs], len);