mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41: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,7 +903,8 @@ static int messages_received_count;
|
|||
outPort: (NSPort*)op
|
||||
ancestorConnection: (NSConnection*)ancestor
|
||||
{
|
||||
NSConnection *newConn;
|
||||
NSNotificationCenter *nCenter;
|
||||
NSConnection *newConn;
|
||||
|
||||
NSParameterAssert (ip);
|
||||
|
||||
|
@ -1034,15 +1035,16 @@ static int messages_received_count;
|
|||
|
||||
/* Register ourselves for invalidation notification when the
|
||||
ports become invalid. */
|
||||
[NSNotificationCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: ip];
|
||||
nCenter = [NSNotificationCenter defaultCenter];
|
||||
[nCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: ip];
|
||||
if (op)
|
||||
[NSNotificationCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: op];
|
||||
[nCenter addObserver: newConn
|
||||
selector: @selector(portIsInvalid:)
|
||||
name: NSPortDidBecomeInvalidNotification
|
||||
object: op];
|
||||
/* if OP is nil, making this notification request would have
|
||||
registered us to receive all NSPortDidBecomeInvalidNotification
|
||||
requests, independent of which port posted them. This isn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue