VM
FossilOrigin-Name: 4bbb8402b5110003c6d19908b6fa9b4a7a6b5903ba1fa691eb93a49aa0f089f4
This commit is contained in:
@ -232,8 +232,8 @@ void conn_process_packet(struct conn * conn, uint8_t *packet, int len,int (*cb)(
|
||||
// extern int cw_process_msg(struct conn * conn,uint8_t*msg,int len);
|
||||
// cw_process_msg(conn,f+4,*(uint32_t*)f);
|
||||
|
||||
printf("Received a fragmented packetm should process it");
|
||||
exit(0);
|
||||
//printf("Received a fragmented packetm should process it");
|
||||
//exit(0);
|
||||
|
||||
/*
|
||||
if (!cwrmsg_init_ctrlhdr(conn,&cwrmsg,f+4,*(uint32_t*)f)){
|
||||
@ -261,3 +261,23 @@ exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Used as main message loop
|
||||
*/
|
||||
int cw_read_messages(struct conn *conn)
|
||||
{
|
||||
uint8_t buf[2024];
|
||||
int len = 2024;
|
||||
|
||||
int n = conn->read(conn, buf, len);
|
||||
if (n<0 )
|
||||
return n;
|
||||
|
||||
if (n > 0)
|
||||
conn_process_packet(conn, buf, n, cw_process_msg, conn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user