mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Make port removal more robust.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11392 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
06bc0f9590
commit
2f04810b22
2 changed files with 19 additions and 18 deletions
|
@ -6,6 +6,8 @@
|
|||
* Source/NSUserDefaults.m: Changed the method name +resetUserDefaults
|
||||
to be +resetStandardUserDefaults for compatibility with MacOS-X, which
|
||||
has now implemented an equivalent for the GNUstep method.
|
||||
* Source/NSPortNameServer.m: When removing a port, remove from
|
||||
internal name tables even if gdomap reports no name to unregister.
|
||||
|
||||
2001-11-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -992,6 +992,7 @@ typedef enum {
|
|||
}
|
||||
else
|
||||
{
|
||||
NSPort *port;
|
||||
unsigned result;
|
||||
|
||||
result = GSSwapBigI32ToHost(*(gsu32*)[[com data] bytes]);
|
||||
|
@ -1002,29 +1003,27 @@ typedef enum {
|
|||
}
|
||||
else
|
||||
{
|
||||
NSPort *port;
|
||||
val = YES;
|
||||
}
|
||||
/*
|
||||
* Find the port that was registered for this name and
|
||||
* remove the mapping table entries.
|
||||
*/
|
||||
port = NSMapGet(_nameMap, name);
|
||||
if (port)
|
||||
{
|
||||
NSMutableSet *known;
|
||||
|
||||
/*
|
||||
* Find the port that was registered for this name and
|
||||
* remove the mapping table entries.
|
||||
*/
|
||||
port = NSMapGet(_nameMap, name);
|
||||
if (port)
|
||||
NSMapRemove(_nameMap, name);
|
||||
known = NSMapGet(_portMap, port);
|
||||
if (known)
|
||||
{
|
||||
NSMutableSet *known;
|
||||
|
||||
NSMapRemove(_nameMap, name);
|
||||
known = NSMapGet(_portMap, port);
|
||||
if (known)
|
||||
[known removeObject: name];
|
||||
if ([known count] == 0)
|
||||
{
|
||||
[known removeObject: name];
|
||||
if ([known count] == 0)
|
||||
{
|
||||
NSMapRemove(_portMap, port);
|
||||
}
|
||||
NSMapRemove(_portMap, port);
|
||||
}
|
||||
}
|
||||
val = YES;
|
||||
}
|
||||
}
|
||||
tmp = com;
|
||||
|
|
Loading…
Reference in a new issue