Changeset 59


Ignore:
Timestamp:
Aug 19, 2007, 9:43:24 PM (18 years ago)
Author:
Yuri Dario
Message:

Do not try to unlock internal databases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/tdb/common/open.c

    r39 r59  
    364364#ifdef __OS2__
    365365        DosCloseMutexSem( tdb->hGlobalLock);
     366        tdb->hGlobalLock = 0;
    366367        DosCloseMutexSem( tdb->hActiveLock);
     368        tdb->hActiveLock = 0;
    367369        DosCloseMutexSem( tdb->hTransactionLock);
     370        tdb->hTransactionLock = 0;
    368371#endif
    369372        if (tdb->fd != -1)
     
    406409        }
    407410        SAFE_FREE(tdb->name);
    408         tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLK, 0, 1);
     411        // YD internal databases do not have a global lock
     412        if (!(tdb->flags & TDB_INTERNAL))
     413                tdb->methods->tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLK, 0, 1);
    409414        if (tdb->fd != -1)
    410415                ret = close(tdb->fd);
Note: See TracChangeset for help on using the changeset viewer.