This commit is contained in:
Michael Davidsaver committed 2026-06-24 18:16:55 -07:00
1 parent f634d3d885
commit 07da9aeb32
2 files changed
+12 -3

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ void camsgtask ( void *pParm )
client->recv.cnt += ( unsigned ) nchars;
status = camessage ( client );
if (status == 0) {
if (status == RSRV_OK) {
/*
* if there is a partial message
* align it with the start of the buffer
+11 -2
View File
@@ -55,10 +55,19 @@ typedef struct caHdrLargeArray {
enum messageBufferType { mbtUDP, mbtSmallTCP, mbtLargeTCP };
struct message_buffer {
char *buf;
/*! points to first filled byte in buffer */
/* Invariants: stk <= cnt <= maxstk
*
* buf : |-*****-----|
* ^ ^ ^
* | | \- maxstk
* | \------ cnt
* \----------- stk
*/
/* points to first filled byte in buffer */
unsigned stk;
/* allocated capacity of buffer */
unsigned maxstk;
/*! points to first unused byte in buffer (after filled bytes) */
/* points to first unused byte in buffer (after filled bytes) */
unsigned cnt;
enum messageBufferType type;
};