mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-19 03:51:38 +00:00
Additional thread safety fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8254 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
656ce47951
commit
1076ed28ab
1 changed files with 4 additions and 2 deletions
|
@ -1312,6 +1312,7 @@ static Class tcpPortClass;
|
|||
if (thePorts != 0)
|
||||
{
|
||||
port = (GSTcpPort*)NSMapGet(thePorts, (void*)aHost);
|
||||
IF_NO_GC(AUTORELEASE(RETAIN(port)));
|
||||
}
|
||||
[tcpPortLock unlock];
|
||||
return port;
|
||||
|
@ -1510,12 +1511,13 @@ static Class tcpPortClass;
|
|||
NSMapInsert(thePorts, (void*)aHost, (void*)port);
|
||||
NSDebugMLLog(@"NSPort", @"Created speaking port: %@", port);
|
||||
}
|
||||
IF_NO_GC(AUTORELEASE(port));
|
||||
}
|
||||
else
|
||||
{
|
||||
RETAIN(port);
|
||||
NSDebugMLLog(@"NSPort", @"Using pre-existing port: %@", port);
|
||||
}
|
||||
IF_NO_GC(AUTORELEASE(port));
|
||||
|
||||
[tcpPortLock unlock];
|
||||
return port;
|
||||
|
@ -1806,7 +1808,7 @@ static Class tcpPortClass;
|
|||
{
|
||||
DO_LOCK(myLock);
|
||||
handle = (GSTcpHandle*)NSMapGet(handles, (void*)(gsaddr)desc);
|
||||
AUTORELEASE(RETAIN(handle));
|
||||
IF_NO_GC(AUTORELEASE(RETAIN(handle)));
|
||||
DO_UNLOCK(myLock);
|
||||
if (handle == nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue