Fix for notification queue item removal and for availableData

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5246 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-11-21 06:33:45 +00:00
parent 51fe7f149c
commit 9e3c780110
3 changed files with 158 additions and 92 deletions

View file

@ -687,20 +687,13 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
strerror(errno)];
}
if (count == 0)
if (count > sizeof(buf))
{
len = 0; /* End-of-file */
count = sizeof(buf);
}
else
if ((len = read(descriptor, buf, count)) > 0)
{
if (count > sizeof(buf))
{
count = sizeof(buf);
}
if ((len = read(descriptor, buf, count)) > 0)
{
[d appendBytes: buf length: len];
}
[d appendBytes: buf length: len];
}
}
if (len < 0)