You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bn...@apache.org on 2001/12/19 17:24:40 UTC

cvs commit: apr/locks/netware thread_mutex.c

bnicholes    01/12/19 08:24:40

  Modified:    locks/netware thread_mutex.c
  Log:
  Added a check to make sure we aren't trying to unlock and lock we don't have
  
  Revision  Changes    Path
  1.5       +4 -1      apr/locks/netware/thread_mutex.c
  
  Index: thread_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/netware/thread_mutex.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- thread_mutex.c	2001/10/17 00:33:00	1.4
  +++ thread_mutex.c	2001/12/19 16:24:40	1.5
  @@ -108,7 +108,10 @@
   
   APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
   {
  -    NXUnlock(mutex->mutex);
  +    if (NXMutexDepth(mutex->mutex) > 0) {
  +        NXUnlock(mutex->mutex);
  +    }
  +
       return APR_SUCCESS;
   }