apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr-util/dbm/sdbm sdbm_lock.c sdbm.c
Date Mon, 30 Apr 2001 13:48:50 GMT
wrowe       01/04/30 06:48:50

  Modified:    dbm/sdbm sdbm_lock.c sdbm.c
  Log:
    Remove exclusive flag choice from sdbm_lock and grant the choice to the
    caller (for shared r/w access patch coming up.)
  
  Revision  Changes    Path
  1.5       +2 -2      apr-util/dbm/sdbm/sdbm_lock.c
  
  Index: sdbm_lock.c
  ===================================================================
  RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm_lock.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sdbm_lock.c	2001/02/16 04:17:09	1.4
  +++ sdbm_lock.c	2001/04/30 13:48:48	1.5
  @@ -58,11 +58,11 @@
   #include "sdbm_private.h"
   
   /* NOTE: this function blocks until it acquires the lock */
  -apr_status_t sdbm_lock(SDBM *db)
  +apr_status_t sdbm_lock(SDBM *db, int exclusive)
   {
       int type;
   
  -    if ((db->flags & SDBM_RDONLY) == 0)
  +    if (exclusive)
           type = APR_FLOCK_EXCLUSIVE;
       else
           type = APR_FLOCK_SHARED;
  
  
  
  1.11      +2 -1      apr-util/dbm/sdbm/sdbm.c
  
  Index: sdbm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- sdbm.c	2001/02/16 04:17:09	1.10
  +++ sdbm.c	2001/04/30 13:48:49	1.11
  @@ -167,7 +167,8 @@
   	    != APR_SUCCESS)
               goto error;
   
  -        if ((status = sdbm_lock(db)) != APR_SUCCESS)
  +        if ((status = sdbm_lock(db, !(db->flags & SDBM_RDONLY)))
  +            != APR_SUCCESS)
               goto error;
   
           if ((status = apr_file_open(&db->dirf, dirname, flags, perms, p))
  
  
  

Mime
View raw message