mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
Fix notification usage.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4410 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
05f1c5e2a4
commit
a9c28e8013
3 changed files with 26 additions and 22 deletions
|
@ -903,6 +903,7 @@ static int messages_received_count;
|
|||
outPort: (NSPort*)op
|
||||
ancestorConnection: (NSConnection*)ancestor
|
||||
{
|
||||
NSNotificationCenter *nCenter;
|
||||
NSConnection *newConn;
|
||||
|
||||
NSParameterAssert (ip);
|
||||
|
@ -1034,12 +1035,13 @@ static int messages_received_count;
|
|||
|
||||
/* Register ourselves for invalidation notification when the
|
||||
ports become invalid. */
|
||||
[NSNotificationCenter addObserver: newConn
|
||||
nCenter = [NSNotificationCenter defaultCenter];
|
||||
[nCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: ip];
|
||||
if (op)
|
||||
[NSNotificationCenter addObserver: newConn
|
||||
[nCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: op];
|
||||
|
|
|
@ -787,6 +787,7 @@ static NSPortNameServer *defaultServer = nil;
|
|||
|
||||
- (void) _open: (NSString*)host
|
||||
{
|
||||
NSNotificationCenter *nc;
|
||||
NSRunLoop *loop;
|
||||
NSString *hostname = host;
|
||||
BOOL isLocal = NO;
|
||||
|
@ -870,15 +871,16 @@ static NSPortNameServer *defaultServer = nil;
|
|||
|
||||
expecting = 1;
|
||||
[handle retain];
|
||||
[NSNotificationCenter addObserver: self
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserver: self
|
||||
selector: @selector(_didConnect:)
|
||||
name: GSFileHandleConnectCompletionNotification
|
||||
object: handle];
|
||||
[NSNotificationCenter addObserver: self
|
||||
[nc addObserver: self
|
||||
selector: @selector(_didRead:)
|
||||
name: NSFileHandleReadCompletionNotification
|
||||
object: handle];
|
||||
[NSNotificationCenter addObserver: self
|
||||
[nc addObserver: self
|
||||
selector: @selector(_didWrite:)
|
||||
name: GSFileHandleWriteCompletionNotification
|
||||
object: handle];
|
||||
|
|
|
@ -698,7 +698,7 @@ deserializeFromInfo(_NSDeserializerInfo* info)
|
|||
}
|
||||
else
|
||||
{
|
||||
[NSNotificationCenter
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(_becomeThreaded:)
|
||||
name: NSWillBecomeMultiThreadedNotification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue