X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fudp.c;h=44a685149f52d7cacdb1d0557566f3a467a75a6c;hb=fe2794b4f932c0755674493b6a6da4b60a5c2433;hp=a721a7bb547d35372825774ad4cdd57dea960e08;hpb=7d881c2e5fef91a6570e46ef69a5d4a5cf0e8b4d;p=tpg%2Facess2.git diff --git a/Modules/IPStack/udp.c b/Modules/IPStack/udp.c index a721a7bb..44a68514 100644 --- a/Modules/IPStack/udp.c +++ b/Modules/IPStack/udp.c @@ -400,6 +400,7 @@ Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf for(;;) { + VFS_SelectNode(Node, VFS_SELECT_READ, NULL); SHORTLOCK(&chan->lQueue); if(chan->Queue == NULL) { SHORTREL(&chan->lQueue); @@ -407,7 +408,10 @@ Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf } pack = chan->Queue; chan->Queue = pack->Next; - if(!chan->Queue) chan->QueueEnd = NULL; + if(!chan->Queue) { + chan->QueueEnd = NULL; + VFS_MarkAvaliable(Node, 0); // Nothing left + } SHORTREL(&chan->lQueue); break; }