From cvs-return-4806-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Thu Feb 27 19:20:27 2003 Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 74687 invoked by uid 500); 27 Feb 2003 19:20:25 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 74631 invoked from network); 27 Feb 2003 19:20:25 -0000 Date: 27 Feb 2003 19:20:24 -0000 Message-ID: <20030227192024.41976.qmail@icarus.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/locks/win32 thread_cond.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 2003/02/27 11:20:24 Modified: locks/win32 thread_cond.c Log: Fix two problems in apr_thread_cond_timedwait, the first observed by Ohtani Hiroki that we failed to relock on failure, and the second problem I found that we weren't returning an error status when we failed for something other than timeup. Revision Changes Path 1.12 +3 -2 apr/locks/win32/thread_cond.c Index: thread_cond.c =================================================================== RCS file: /home/cvs/apr/locks/win32/thread_cond.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- thread_cond.c 6 Jan 2003 23:44:31 -0000 1.11 +++ thread_cond.c 27 Feb 2003 19:20:24 -0000 1.12 @@ -142,10 +142,11 @@ if (res != WAIT_OBJECT_0) { apr_status_t rv = apr_get_os_error(); ReleaseMutex(cond->mutex); + apr_thread_mutex_lock(mutex); if (res == WAIT_TIMEOUT) { - rv = APR_TIMEUP; + return APR_TIMEUP; } - return rv; + return apr_get_os_error(); } if (cond->signal_all) { if (cond->num_waiting == 0) {