apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r584331 - /apr/apr/trunk/shmem/win32/shm.c
Date Fri, 12 Oct 2007 23:43:14 GMT
Author: davi
Date: Fri Oct 12 16:43:14 2007
New Revision: 584331

URL: http://svn.apache.org/viewvc?rev=584331&view=rev
Log:
The calls to UnmapViewOfFile() and CloseHandle() in the shm_cleanup()
routine in the win32/shm.c source are not properly checking for errors.
They currently assume a non-zero return is an error.Whereas these windows
calls return non-zero on success and zero on failure.

PR: 43065
Submitted by: Joe Mudd

Modified:
    apr/apr/trunk/shmem/win32/shm.c

Modified: apr/apr/trunk/shmem/win32/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/shmem/win32/shm.c?rev=584331&r1=584330&r2=584331&view=diff
==============================================================================
--- apr/apr/trunk/shmem/win32/shm.c (original)
+++ apr/apr/trunk/shmem/win32/shm.c Fri Oct 12 16:43:14 2007
@@ -40,10 +40,10 @@
     apr_status_t rv = APR_SUCCESS;
     apr_shm_t *m = shm;
     
-    if (UnmapViewOfFile(m->memblk)) {
+    if (!UnmapViewOfFile(m->memblk)) {
         rv = apr_get_os_error();
     }
-    if (CloseHandle(m->hMap)) {
+    if (!CloseHandle(m->hMap)) {
         return (rv != APR_SUCCESS) ? rv : apr_get_os_error();
     }
     /* ### Do we want to make a point of unlinking m->file here? 



Mime
View raw message