You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by je...@apache.org on 2007/02/28 17:56:37 UTC

svn commit: r512842 - /apr/apr-util/trunk/dbm/sdbm/sdbm.c

Author: jerenkrantz
Date: Wed Feb 28 08:56:36 2007
New Revision: 512842

URL: http://svn.apache.org/viewvc?view=rev&rev=512842
Log:
Only enable APR buffering if we aren't intending to write to the sdbm.

Suggested by: Joe

Modified:
    apr/apr-util/trunk/dbm/sdbm/sdbm.c

Modified: apr/apr-util/trunk/dbm/sdbm/sdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbm/sdbm/sdbm.c?view=diff&rev=512842&r1=512841&r2=512842
==============================================================================
--- apr/apr-util/trunk/dbm/sdbm/sdbm.c (original)
+++ apr/apr-util/trunk/dbm/sdbm/sdbm.c Wed Feb 28 08:56:36 2007
@@ -107,6 +107,7 @@
      */
     if (!(flags & APR_WRITE)) {
         db->flags |= SDBM_RDONLY;
+        flags &= APR_BUFFERED;
     }
 
     /*
@@ -120,7 +121,7 @@
         flags &= ~APR_SHARELOCK;
     }
 
-    flags |= APR_BINARY | APR_READ | APR_BUFFERED;
+    flags |= APR_BINARY | APR_READ;
 
     /*
      * open the files in sequence, and stat the dirfile.



Re: svn commit: r512842 - /apr/apr-util/trunk/dbm/sdbm/sdbm.c

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 2/28/07, André Malo <nd...@perlig.de> wrote:
> I do assume, that should be |=, shouldn't it? ;-)

Ergh.  Yah.  Stupid C&P from the sharelock and I didn't pay attention
to the fact that it was negated.

Doh.  Fixed in r512867.  -- justin

Re: svn commit: r512842 - /apr/apr-util/trunk/dbm/sdbm/sdbm.c

Posted by André Malo <nd...@perlig.de>.
* jerenkrantz@apache.org wrote: 

> http://svn.apache.org/viewvc/apr/apr-util/trunk/dbm/sdbm/sdbm.c?view=diff
>&rev=512842&r1=512841&r2=512842
> =========================================================================
>===== --- apr/apr-util/trunk/dbm/sdbm/sdbm.c (original)
> +++ apr/apr-util/trunk/dbm/sdbm/sdbm.c Wed Feb 28 08:56:36 2007
> @@ -107,6 +107,7 @@
>       */
>      if (!(flags & APR_WRITE)) {
>          db->flags |= SDBM_RDONLY;
> +        flags &= APR_BUFFERED;

I do assume, that should be |=, shouldn't it? ;-)

nd