Ignore:
Timestamp:
May 20, 2009, 6:46:53 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/locking/locking.c

    r141 r204  
    14101410}
    14111411
    1412 bool set_write_time(struct file_id fileid, struct timespec write_time,
    1413                     bool overwrite)
     1412bool set_sticky_write_time(struct file_id fileid, struct timespec write_time)
    14141413{
    14151414        struct share_mode_lock *lck;
    14161415
    1417         DEBUG(5,("set_write_time: %s overwrite=%d id=%s\n",
     1416        DEBUG(5,("set_sticky_write_time: %s id=%s\n",
    14181417                 timestring(debug_ctx(),
    14191418                            convert_timespec_to_time_t(write_time)),
    1420                  overwrite, file_id_string_tos(&fileid)));
     1419                 file_id_string_tos(&fileid)));
    14211420
    14221421        lck = get_share_mode_lock(NULL, fileid, NULL, NULL, NULL);
     
    14251424        }
    14261425
    1427         if (overwrite || null_timespec(lck->changed_write_time)) {
     1426        if (timespec_compare(&lck->changed_write_time, &write_time) != 0) {
    14281427                lck->modified = True;
    14291428                lck->changed_write_time = write_time;
     
    14331432        return True;
    14341433}
     1434
     1435bool 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
    14351458
    14361459struct forall_state {
Note: See TracChangeset for help on using the changeset viewer.