mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-12 00:51:08 +00:00
fix for possible error when receiving out of bad data
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28108 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b4e0b8fcf9
commit
23f68cd57f
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2009-03-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSMessagePort.m:
|
||||||
|
* Source/NSSocketPort.m:
|
||||||
|
Fix to treat exceptional (out of band) event as meaning a readable
|
||||||
|
rather than a writable descriptor.
|
||||||
|
|
||||||
2009-03-20 Richard Frith-Macdonald <rfm@gnu.org>
|
2009-03-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSURLCredential.m:
|
* Source/NSURLCredential.m:
|
||||||
|
|
|
@ -536,7 +536,7 @@ static Class runLoopClass;
|
||||||
{
|
{
|
||||||
NSDebugMLLog(@"NSMessagePort_details",
|
NSDebugMLLog(@"NSMessagePort_details",
|
||||||
@"received %s event on 0x%x",
|
@"received %s event on 0x%x",
|
||||||
type == ET_RPORT ? "read" : "write", self);
|
type != ET_WDESC ? "read" : "write", self);
|
||||||
/*
|
/*
|
||||||
* If we have been invalidated (desc < 0) then we should ignore this
|
* If we have been invalidated (desc < 0) then we should ignore this
|
||||||
* event and remove ourself from the runloop.
|
* event and remove ourself from the runloop.
|
||||||
|
@ -558,7 +558,7 @@ static Class runLoopClass;
|
||||||
|
|
||||||
M_LOCK(myLock);
|
M_LOCK(myLock);
|
||||||
|
|
||||||
if (type == ET_RPORT)
|
if (type != ET_WDESC)
|
||||||
{
|
{
|
||||||
unsigned want;
|
unsigned want;
|
||||||
void *bytes;
|
void *bytes;
|
||||||
|
|
|
@ -1229,7 +1229,7 @@ static Class runLoopClass;
|
||||||
WSANETWORKEVENTS ocurredEvents;
|
WSANETWORKEVENTS ocurredEvents;
|
||||||
#endif
|
#endif
|
||||||
NSDebugMLLog(@"GSTcpHandle", @"received %s event on 0x%x",
|
NSDebugMLLog(@"GSTcpHandle", @"received %s event on 0x%x",
|
||||||
type == ET_RPORT ? "read" : "write", self);
|
type != ET_WDESC ? "read" : "write", self);
|
||||||
/*
|
/*
|
||||||
* If we have been invalidated (desc < 0) then we should ignore this
|
* If we have been invalidated (desc < 0) then we should ignore this
|
||||||
* event and remove ourself from the runloop.
|
* event and remove ourself from the runloop.
|
||||||
|
@ -1326,7 +1326,7 @@ static Class runLoopClass;
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (type == ET_RPORT)
|
if (type != ET_WDESC)
|
||||||
{
|
{
|
||||||
[self receivedEventRead];
|
[self receivedEventRead];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue