mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
([GSFileHandle -gcFinalize]): if __MINGW__ also
close ordinary file descriptor, not only the socket. ([GSFileHandle -closeFile]): in __MINGW__ defined block: changed test of !isStandardFile to isSocket, and make sure that the ordinary file descriptor is also closed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19784 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6dacaa30eb
commit
84780b84a2
1 changed files with 6 additions and 12 deletions
|
@ -297,12 +297,11 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
|||
{
|
||||
#if defined(__MINGW__)
|
||||
if (isSocket)
|
||||
closesocket((SOCKET)_get_osfhandle(descriptor));
|
||||
else
|
||||
close(descriptor);
|
||||
#else
|
||||
close(descriptor);
|
||||
{
|
||||
closesocket((SOCKET)_get_osfhandle(descriptor));
|
||||
}
|
||||
#endif
|
||||
close(descriptor);
|
||||
descriptor = -1;
|
||||
}
|
||||
}
|
||||
|
@ -1688,17 +1687,12 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
|
|||
}
|
||||
#endif
|
||||
#if defined(__MINGW__)
|
||||
if (isStandardFile)
|
||||
{
|
||||
(void)_close(descriptor);
|
||||
}
|
||||
else
|
||||
if (isSocket)
|
||||
{
|
||||
(void)closesocket((SOCKET)_get_osfhandle(descriptor));
|
||||
}
|
||||
#else
|
||||
(void)close(descriptor);
|
||||
#endif
|
||||
(void)close(descriptor);
|
||||
descriptor = -1;
|
||||
acceptOK = NO;
|
||||
connectOK = NO;
|
||||
|
|
Loading…
Reference in a new issue