minor
This commit is contained in:
1 parent
f634d3d885
commit
07da9aeb32
2 files changed
+12
-3
No files matched your search
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user