X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fudp.c;h=6f3abc603b19db256e68993e1e98fee0cf696902;hb=7941d6b368acb0abc17e6a77ffaf7b4c306b67ab;hp=1fce3ac249384edda6eb2654f1f4a7739c139ac8;hpb=eceedd44a40b713c2adf0ea8e3e864099e97477c;p=tpg%2Facess2.git diff --git a/Modules/IPStack/udp.c b/Modules/IPStack/udp.c index 1fce3ac2..6f3abc60 100644 --- a/Modules/IPStack/udp.c +++ b/Modules/IPStack/udp.c @@ -70,7 +70,8 @@ int UDP_int_ScanList(tUDPChannel *List, tInterface *Interface, void *Address, in // Check for remote address restriction if(chan->RemoteMask) { - if(chan->Remote.AddrType != Interface->Type) continue; + if(chan->Remote.AddrType != Interface->Type) + continue; if(!IPStack_CompareAddress(Interface->Type, Address, &chan->Remote.Addr, chan->RemoteMask) ) @@ -94,6 +95,7 @@ int UDP_int_ScanList(tUDPChannel *List, tInterface *Interface, void *Address, in else chan->QueueEnd = chan->Queue = pack; SHORTREL(&chan->lQueue); + VFS_MarkAvaliable(&chan->Node, 1); Mutex_Release(&glUDP_Channels); return 1; } @@ -190,7 +192,10 @@ Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf tUDPEndpoint *ep; int ofs; - if(chan->LocalPort == 0) return 0; + if(chan->LocalPort == 0) { + Log_Notice("UDP", "Channel %p sent with no local port", chan); + return 0; + } while(chan->Queue == NULL) Threads_Yield(); @@ -217,6 +222,7 @@ Uint64 UDP_Channel_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buf ofs = 4 + IPStack_GetAddressSize(pack->Remote.AddrType); if(Length < ofs) { free(pack); + Log_Notice("UDP", "Insuficient space for header in buffer (%i < %i)", (int)Length, ofs); return 0; }