Ignore:
Timestamp:
Nov 13, 2013, 2:29:56 PM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: changed locking code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/lib/tdb/common/lock.c

    r827 r828  
    257257        fl.l_pid = 0;
    258258#ifdef __OS2__
    259         return fcntl_lock(tdb, F_UNLCK, off, len, 1);
     259        int rc = 0;
     260        if (off == FREELIST_TOP && len == 0) { //unlock complete tdb file
     261                rc = fcntl_lock(tdb, F_UNLCK, off, tdb->header.hash_size *4, 1);
     262                if (rc == 0)
     263                        rc = fcntl_lock(tdb, F_UNLCK, (off + tdb->header.hash_size *4), len, 1);
     264        } else {
     265                rc = fcntl_lock(tdb, F_UNLCK, off, len, 1);
     266        }
     267        return rc;
    260268#else
    261269        return fcntl(tdb->fd, F_SETLKW, &fl);
Note: See TracChangeset for help on using the changeset viewer.