Changeset 204 for branches/samba-3.2.x/source/locking
- Timestamp:
- May 20, 2009, 6:46:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/locking/locking.c
r141 r204 1410 1410 } 1411 1411 1412 bool set_write_time(struct file_id fileid, struct timespec write_time, 1413 bool overwrite) 1412 bool set_sticky_write_time(struct file_id fileid, struct timespec write_time) 1414 1413 { 1415 1414 struct share_mode_lock *lck; 1416 1415 1417 DEBUG(5,("set_ write_time: %s overwrite=%did=%s\n",1416 DEBUG(5,("set_sticky_write_time: %s id=%s\n", 1418 1417 timestring(debug_ctx(), 1419 1418 convert_timespec_to_time_t(write_time)), 1420 overwrite,file_id_string_tos(&fileid)));1419 file_id_string_tos(&fileid))); 1421 1420 1422 1421 lck = get_share_mode_lock(NULL, fileid, NULL, NULL, NULL); … … 1425 1424 } 1426 1425 1427 if ( overwrite || null_timespec(lck->changed_write_time)) {1426 if (timespec_compare(&lck->changed_write_time, &write_time) != 0) { 1428 1427 lck->modified = True; 1429 1428 lck->changed_write_time = write_time; … … 1433 1432 return True; 1434 1433 } 1434 1435 bool set_write_time(struct file_id fileid, struct timespec write_time) 1436 { 1437 struct share_mode_lock *lck; 1438 1439 DEBUG(5,("set_write_time: %s id=%s\n", 1440 timestring(debug_ctx(), 1441 convert_timespec_to_time_t(write_time)), 1442 file_id_string_tos(&fileid))); 1443 1444 lck = get_share_mode_lock(NULL, fileid, NULL, NULL, NULL); 1445 if (lck == NULL) { 1446 return False; 1447 } 1448 1449 if (timespec_compare(&lck->old_write_time, &write_time) != 0) { 1450 lck->modified = True; 1451 lck->old_write_time = write_time; 1452 } 1453 1454 TALLOC_FREE(lck); 1455 return True; 1456 } 1457 1435 1458 1436 1459 struct forall_state {
Note:
See TracChangeset
for help on using the changeset viewer.