little bug fixes

This commit is contained in:
rsc 2004-06-17 18:51:50 +00:00
parent 503f601cb0
commit 7cb748941e
4 changed files with 14 additions and 4 deletions

View file

@ -64,6 +64,9 @@ vtreadpacket(VtConn *z, uchar score[VtScoreSize], uint type, int n)
{
VtFcall tx, rx;
if(memcmp(score, vtzeroscore, VtScoreSize) == 0)
return packetalloc();
memset(&tx, 0, sizeof tx);
tx.type = VtTread;
tx.dtype = type;
@ -107,6 +110,10 @@ vtwritepacket(VtConn *z, uchar score[VtScoreSize], uint type, Packet *p)
{
VtFcall tx, rx;
if(packetsize(p) == 0){
memmove(score, vtzeroscore, VtScoreSize);
return 0;
}
tx.type = VtTwrite;
tx.dtype = type;
tx.data = p;