libventi: protocol support for blocks larger than 64k
This commit is contained in:
parent
9cac97f2c5
commit
33b446b8bb
6 changed files with 79 additions and 23 deletions
|
|
@ -65,6 +65,10 @@ vtreadpacket(VtConn *z, uchar score[VtScoreSize], uint type, int n)
|
|||
if(memcmp(score, vtzeroscore, VtScoreSize) == 0)
|
||||
return packetalloc();
|
||||
|
||||
if(z->version[1] == '2' && n >= (1<<16)) {
|
||||
werrstr("read count too large for protocol");
|
||||
return nil;
|
||||
}
|
||||
memset(&tx, 0, sizeof tx);
|
||||
tx.msgtype = VtTread;
|
||||
tx.blocktype = type;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue