mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
fix some close on -1 issues
This commit is contained in:
parent
c60dfb50d5
commit
7c5b5ce8a4
@ -1 +1 @@
|
||||
Wed Nov 7 10:37:54 CST 2012
|
||||
Tue Aug 27 13:58:18 EDT 2013
|
||||
|
@ -32,6 +32,10 @@ static apr_status_t socket_cleanup(void *sock)
|
||||
{
|
||||
apr_socket_t *thesocket = sock;
|
||||
|
||||
if (thesocket && thesocket->socketdes == -1) {
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
if (close(thesocket->socketdes) == 0) {
|
||||
thesocket->socketdes = -1;
|
||||
return APR_SUCCESS;
|
||||
|
@ -1 +1 @@
|
||||
Mon Apr 16 11:52:47 CDT 2012
|
||||
Tue Aug 27 13:58:32 EDT 2013
|
||||
|
@ -100,6 +100,9 @@ int
|
||||
psf_fclose (SF_PRIVATE *psf)
|
||||
{ int retval ;
|
||||
|
||||
if (psf->filedes =- -1)
|
||||
return -1; /* already closed */
|
||||
|
||||
if (psf->virtual_io)
|
||||
return 0 ;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user