diff --git a/ChangeLog b/ChangeLog index 830f108f7..83625546b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-07-09 Richard Frith-Macdonald + + * Source/GSTcpHandle.m: Always use runloop in NSConnectionReplyMode + to avoid other NSDefaultRunLoopMode events being triggered while + executing a DO method. **EXPERIMENTAL** + 2002-07-08 Richard Frith-Macdonald * Version: 1.4.0 diff --git a/Source/GSTcpPort.m b/Source/GSTcpPort.m index 37c51b1b9..b49c31621 100644 --- a/Source/GSTcpPort.m +++ b/Source/GSTcpPort.m @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -421,7 +422,7 @@ static Class runLoopClass; return nil; } #endif - handle = (GSTcpHandle*)NSAllocateObject(self,0,NSDefaultMallocZone()); + handle = (GSTcpHandle*)NSAllocateObject(self, 0, NSDefaultMallocZone()); handle->desc = d; handle->wMsgs = [NSMutableArray new]; if (multi_threaded == YES) @@ -550,22 +551,22 @@ static Class runLoopClass; [l addEvent: (void*)(gsaddr)desc type: ET_WDESC watcher: self - forMode: NSDefaultRunLoopMode]; + forMode: NSConnectionReplyMode]; [l addEvent: (void*)(gsaddr)desc type: ET_EDESC watcher: self - forMode: NSDefaultRunLoopMode]; + forMode: NSConnectionReplyMode]; while (state == GS_H_TRYCON && [when timeIntervalSinceNow] > 0) { - [l runMode: NSDefaultRunLoopMode beforeDate: when]; + [l runMode: NSConnectionReplyMode beforeDate: when]; } [l removeEvent: (void*)(gsaddr)desc type: ET_WDESC - forMode: NSDefaultRunLoopMode + forMode: NSConnectionReplyMode all: NO]; [l removeEvent: (void*)(gsaddr)desc type: ET_EDESC - forMode: NSDefaultRunLoopMode + forMode: NSConnectionReplyMode all: NO]; if (state == GS_H_TRYCON) @@ -1181,12 +1182,12 @@ static Class runLoopClass; [l addEvent: (void*)(gsaddr)desc type: ET_WDESC watcher: self - forMode: NSDefaultRunLoopMode]; + forMode: NSConnectionReplyMode]; while ([wMsgs indexOfObjectIdenticalTo: components] != NSNotFound && [when timeIntervalSinceNow] > 0) { DO_UNLOCK(myLock); - [l runMode: NSDefaultRunLoopMode beforeDate: when]; + [l runMode: NSConnectionReplyMode beforeDate: when]; DO_LOCK(myLock); } /* @@ -1407,7 +1408,7 @@ static Class tcpPortClass; if (port == nil) { - port = (GSTcpPort*)NSAllocateObject(self,0,NSDefaultMallocZone()); + port = (GSTcpPort*)NSAllocateObject(self, 0, NSDefaultMallocZone()); port->listener = -1; port->host = RETAIN(aHost); port->address = [addr copy]; diff --git a/Source/NSConnection.m b/Source/NSConnection.m index d9eeae0c8..fb3811d0b 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -1784,7 +1784,7 @@ static void retEncoder (DOContext *ctxt) } /* - * NSDistantObject's -forward: : method calls this to send the message + * NSDistantObject's -forward:: method calls this to send the message * over the wire. */ - (retval_t) forwardForProxy: (NSDistantObject*)object @@ -1916,7 +1916,7 @@ static void retEncoder (DOContext *ctxt) * NSDistantObject's -forwardInvocation: method calls this to send the message * over the wire. */ -- (void) forwardInvocation: (NSInvocation *)inv +- (void) forwardInvocation: (NSInvocation*)inv forProxy: (NSDistantObject*)object { NSPortCoder *op;