Work in progress ...
FossilOrigin-Name: a76e8760f309d36aad22507f961ac5a03f46df9ee585c2f8601ee0a5a088738e
This commit is contained in:
@ -22,10 +22,14 @@
|
||||
#include "conn.h"
|
||||
#include "cwmsg.h"
|
||||
|
||||
#include <stdio.h> //Tube
|
||||
|
||||
void cwmsg_addelem_mtu_discovery_padding(struct cwmsg * msg, struct conn* conn)
|
||||
{
|
||||
int len = conn->mtu - (msg->msgelems-msg->buffer+msg->pos)-4;
|
||||
|
||||
printf("MTU discovery len %d %d and pos %d:\n",conn->mtu,len,msg->pos);
|
||||
|
||||
if (len < 0 )
|
||||
return;
|
||||
|
||||
@ -33,5 +37,7 @@ void cwmsg_addelem_mtu_discovery_padding(struct cwmsg * msg, struct conn* conn)
|
||||
*((uint32_t*)(msg->msgelems+msg->pos))=htonl(val);
|
||||
memset(msg->msgelems+4+msg->pos,0xff,len);
|
||||
msg->pos+=4+len;
|
||||
|
||||
printf("Nenpos = %d\n",msg->pos);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user