mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
fix for tcp/ip ports
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28363 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bba0d6cfc7
commit
30ed7e0612
4 changed files with 20 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-06-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/win32/GSRunLoopCtxt.m: Fix error sending received event
|
||||
handle to watcher. Had broken TCP/IP ports.
|
||||
|
||||
2009-06-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/Unicode.m: Fix incorrect attempt to free memory
|
||||
|
|
|
@ -133,6 +133,17 @@ typedef enum {
|
|||
#endif
|
||||
} RunLoopEventType;
|
||||
@protocol RunLoopEvents
|
||||
/* This is the message sent back to a watcher when an event is observed
|
||||
* by the run loop.
|
||||
* The 'data', 'type' and 'mode' arguments are the same as the arguments
|
||||
* passed to the -addEvent:type:watcher:forMode: method.
|
||||
* The 'extra' argument varies. For an ET_TRIGGER event, it is the same
|
||||
* as the 'data' argument. For other events on unix it is the file
|
||||
* descriptor associated with the event (which may be the same as the
|
||||
* 'data' argument, but is not in the case of ET_RPORT).
|
||||
* For windows it will be the handle or the windows message assciated
|
||||
* with the event.
|
||||
*/
|
||||
- (void) receivedEvent: (void*)data
|
||||
type: (RunLoopEventType)type
|
||||
extra: (void*)extra
|
||||
|
|
|
@ -1874,6 +1874,7 @@ static Class tcpPortClass;
|
|||
if (handle->recvPort == recvSelf && handle->inReplyMode == NO)
|
||||
{
|
||||
fds[(*count)++] = (uintptr_t)event;
|
||||
NSDebugMLLog(@"NSPort", @"Add event %p", event);
|
||||
}
|
||||
}
|
||||
NSEndMapTableEnumeration(&me);
|
||||
|
@ -2148,8 +2149,8 @@ static Class tcpPortClass;
|
|||
#endif
|
||||
GSTcpHandle *handle;
|
||||
|
||||
NSDebugMLLog(@"NSPort", @"received %s event on 0x%x",
|
||||
type == ET_RPORT ? "read" : "write", self);
|
||||
NSDebugMLLog(@"NSPort", @"received %s event %p on 0x%x",
|
||||
type == ET_RPORT ? "read" : "write", extra, self);
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
if (event == eventListener)
|
||||
|
|
|
@ -562,7 +562,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
|
|||
NSDebugMLLog(@"NSRunLoop", @"Event callback found");
|
||||
[watcher->receiver receivedEvent: watcher->data
|
||||
type: watcher->type
|
||||
extra: watcher->data
|
||||
extra: (void*)handle
|
||||
forMode: mode];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue