Changeset 298 for branches/samba-3.0
- Timestamp:
- Jul 3, 2009, 10:21:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/tdb/common/lock.c
r286 r298 1 1 /* 2 2 Unix SMB/CIFS implementation. 3 3 … … 87 87 break; 88 88 default: 89 #if def __OS2LOCKDEBUG__89 #if 0 90 90 printf( "_mutex_brlock unknown offset %d\n", offset); 91 91 #endif … … 93 93 } 94 94 if (hSem == 0) { 95 #if def __OS2LOCKDEBUG__95 #if 0 96 96 printf( "_mutex_brlock unknown sem handle offset %d\n", offset); 97 97 #endif 98 98 exit(1); 99 99 } 100 #if def __OS2LOCKDEBUG__100 #if 1 101 101 TDB_LOG((tdb, TDB_DEBUG_TRACE,"_mutex_brlock handle %d, offset %d\n", hSem, offset)); 102 102 #endif … … 116 116 break; 117 117 default: 118 #if def __OS2LOCKDEBUG__118 #if 0 119 119 printf( "_mutex_brlock unknown rw_type request %d\n", rw_type); 120 120 #endif … … 129 129 130 130 errno = EINVAL; 131 #if def __OS2LOCKDEBUG__131 #if 1 132 132 TDB_LOG(( tdb, TDB_DEBUG_ERROR, "_mutex_brlock pid %X, failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d, rc=%d\n", 133 133 getpid(), tdb->fd, offset, rw_type, lck_type, (int)len, rc)); … … 163 163 off_t cbRange; 164 164 165 #if def __OS2LOCKDEBUG__165 #if 1 166 166 TDB_LOG((tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, fd %d, lck_type %s, rw_type %s, offset %d, len %d\n", 167 167 getpid(), tdb->fd, lock_type(lck_type), read_type(rw_type), offset, len)); … … 211 211 rc = DosSetFileLocks(tdb->fd, &aflock[0], &aflock[1], SEM_IMMEDIATE_RETURN, fAccess); 212 212 if (rc != NO_ERROR) { 213 #if def __OS2LOCKDEBUG__213 #if 1 214 214 TDB_LOG(( tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, fd %d, rc=%d FAILED\n", 215 215 getpid(), tdb->fd, rc)); … … 217 217 } 218 218 if (rc != NO_ERROR && lck_type == F_SETLKW) { 219 #if def __OS2LOCKDEBUG__219 #if 1 220 220 TDB_LOG(( tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, fd %d, rc=%d RETRY WAIT\n", 221 221 getpid(), tdb->fd, rc)); … … 224 224 do { 225 225 rc = DosSetFileLocks(tdb->fd, &aflock[0], &aflock[1], 100, fAccess); 226 #if def __OS2LOCKDEBUG__226 #if 1 227 227 TDB_LOG(( tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, fd %d, rc=%d RETRY WAIT(%d)\n", 228 228 getpid(), tdb->fd, rc,count)); … … 243 243 tdb->fd, offset, rw_type, lck_type, (int)len)); 244 244 } 245 #if def __OS2LOCKDEBUG__245 #if 1 246 246 TDB_LOG(( tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d\n", 247 247 getpid(), tdb->fd, offset, rw_type, lck_type, (int)len)); … … 249 249 return TDB_ERRCODE(TDB_ERR_LOCK, -1); 250 250 } 251 #if def __OS2LOCKDEBUG__251 #if 1 252 252 TDB_LOG(( tdb, TDB_DEBUG_TRACE, "tdb_brlock pid %X, fd %d, lck_type %s, rw_type %s, offset %d, len %d DONE\n", 253 253 getpid(), tdb->fd, lock_type(lck_type), read_type(rw_type), offset, len));
Note:
See TracChangeset
for help on using the changeset viewer.