helly           Wed Nov  6 05:43:41 2002 EDT

  Modified files:              
    /php4/ext/dba       dba_flatfile.c 
  Log:
  fix locks and reading
  #i will extend the tests to guard on such failures
  
  
Index: php4/ext/dba/dba_flatfile.c
diff -u php4/ext/dba/dba_flatfile.c:1.1 php4/ext/dba/dba_flatfile.c:1.2
--- php4/ext/dba/dba_flatfile.c:1.1     Wed Nov  6 04:17:50 2002
+++ php4/ext/dba/dba_flatfile.c Wed Nov  6 05:43:41 2002
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dba_flatfile.c,v 1.1 2002/11/06 09:17:50 helly Exp $ */
+/* $Id: dba_flatfile.c,v 1.2 2002/11/06 10:43:41 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -157,16 +157,16 @@
 {
        DBM_DATA;
 
+       if (dba->lockfn) {
 #if NFS_HACK
-       VCWD_UNLINK(dba->lockfn);
+               VCWD_UNLINK(dba->lockfn);
 #else
-       if (dba->lockfn) {
                /*dba->lockfd = VCWD_OPEN_MODE(dba->lockfn, O_RDWR, 0644);*/
                flock(dba->lockfd, LOCK_UN);
                close(dba->lockfd);
-       }
 #endif
-       efree(dba->lockfn);
+               efree(dba->lockfn);
+       }
 
        php_stream_close(dba->fp);
        if (dba->nextkey.dptr)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to