]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix some close on -1 issues
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Aug 2013 17:59:24 +0000 (13:59 -0400)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Aug 2013 17:59:30 +0000 (13:59 -0400)
libs/apr/.update
libs/apr/network_io/unix/sockets.c
libs/libsndfile/.update
libs/libsndfile/src/file_io.c

index c106d5b06fbe8214c054187bfec1972a9025c1d7..1aeaab4078ae03410ee0c71f194da5ed41318d50 100644 (file)
@@ -1 +1 @@
-Wed Nov  7 10:37:54 CST 2012
+Tue Aug 27 13:58:18 EDT 2013
index 6d24cdcf008990bac7a009e96493f66f0e2194a7..4cff3bbca192e5cb24d193f41afb6fe89a7dbd1b 100644 (file)
@@ -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;
index 31cb06ca73758f043330f165c7bfff9c9f62f97f..e766ea3ad39668acc65d1e19d858b97a7100142d 100644 (file)
@@ -1 +1 @@
-Mon Apr 16 11:52:47 CDT 2012
+Tue Aug 27 13:58:32 EDT 2013
index 4e5ee3eed675faa98a6f5931595f5f63c020e701..5fb880cd26d66e438e2384fe75adc5088a4158fd 100644 (file)
@@ -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 ;