Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/tdb/common/io.c

    r599 r745  
    77   Copyright (C) Paul `Rusty' Russell              2000
    88   Copyright (C) Jeremy Allison                    2000-2003
    9    
     9
    1010     ** NOTE! The following LGPL license applies to the tdb
    1111     ** library. This does NOT imply that all of Samba is released
    1212     ** under the LGPL
    13    
     13
    1414   This library is free software; you can redistribute it and/or
    1515   modify it under the terms of the GNU Lesser General Public
     
    9494        // the owner (us) is not allowed to write to the file (different from unix)
    9595        TDB_LOG((tdb, TDB_DEBUG_TRACE,"unlocking at %d len=%d before writing.\n", off, len));
    96         tdb_brlock( tdb, off, F_UNLCK, F_SETLK, 0, 1);
     96        tdb_brunlock( tdb, F_RDLCK, off, len);
    9797        // if a wider previous lock is in effect, we cannot write lock our segment
    9898        // (e.g. a lock_upgrade locks all the file), so we hope the previous lock
    9999        // is a write lock: do not wait for lock.
    100         tdb_brlock( tdb, off, F_WRLCK, F_SETLK, 0, len);
     100        tdb_brlock( tdb, F_WRLCK, off, len, F_SETLK);
    101101#endif
    102102
     
    126126                                 "write %d bytes at %d in two attempts\n",
    127127                                 len, off));
    128 
    129128#ifdef __OS2__ // remove our lock
    130                         tdb_brlock( tdb, off, F_UNLCK, F_SETLK, 0, len);
     129                        tdb_brunlock( tdb, F_WRLCK, off, len);
    131130#endif
    132131                        return -1;
    133132                }
    134133        }
    135 
    136134#ifdef __OS2__ // remove our lock
    137         tdb_brlock( tdb, off, F_UNLCK, F_SETLK, 0, len);
     135                        tdb_brunlock( tdb, F_WRLCK, off, len);
    138136#endif
    139 
    140137        return 0;
    141138}
     
    497494        tdb_oob,
    498495        tdb_expand_file,
    499         tdb_brlock
    500496};
    501497
Note: See TracChangeset for help on using the changeset viewer.