Changeset 204 for branches/samba-3.2.x/source/smbd/trans2.c
- Timestamp:
- May 20, 2009, 6:46:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/smbd/trans2.c
r154 r204 749 749 + data_alignment_offset); 750 750 751 /* useable_space can never be more than max_send minus the alignment offset. */ 752 753 useable_space = MIN(useable_space, max_send - (alignment_offset+data_alignment_offset)); 751 if (useable_space < 0) { 752 DEBUG(0, ("send_trans2_replies failed sanity useable_space " 753 "= %d!!!", useable_space)); 754 exit_server_cleanly("send_trans2_replies: Not enough space"); 755 } 754 756 755 757 while (params_to_send || data_to_send) { 756 758 /* Calculate whether we will totally or partially fill this packet */ 757 759 758 total_sent_thistime = params_to_send + data_to_send + alignment_offset + data_alignment_offset;760 total_sent_thistime = params_to_send + data_to_send; 759 761 760 762 /* We can never send more than useable_space */ … … 766 768 */ 767 769 768 total_sent_thistime = MIN(total_sent_thistime, useable_space+ alignment_offset + data_alignment_offset); 769 770 reply_outbuf(req, 10, total_sent_thistime); 770 total_sent_thistime = MIN(total_sent_thistime, useable_space); 771 772 reply_outbuf(req, 10, total_sent_thistime + alignment_offset 773 + data_alignment_offset); 771 774 772 775 /* Set total params and data to be sent */ … … 1947 1950 case SMB_FIND_FILE_UNIX: 1948 1951 case SMB_FIND_FILE_UNIX_INFO2: 1952 /* Always use filesystem for UNIX mtime query. */ 1953 ask_sharemode = false; 1949 1954 if (!lp_unix_extensions()) { 1950 1955 reply_nterror(req, NT_STATUS_INVALID_LEVEL); … … 2304 2309 case SMB_FIND_FILE_UNIX: 2305 2310 case SMB_FIND_FILE_UNIX_INFO2: 2311 /* Always use filesystem for UNIX mtime query. */ 2312 ask_sharemode = false; 2306 2313 if (!lp_unix_extensions()) { 2307 2314 reply_nterror(req, NT_STATUS_INVALID_LEVEL); … … 4141 4148 } 4142 4149 4143 if (!null_timespec(write_time_ts) ) {4150 if (!null_timespec(write_time_ts) && !INFO_LEVEL_IS_UNIX(info_level)) { 4144 4151 mtime_ts = write_time_ts; 4145 4152 } … … 4896 4903 4897 4904 if (fsp != NULL) { 4898 set_ write_time_fsp(fsp, ts[1], true);4905 set_sticky_write_time_fsp(fsp, ts[1]); 4899 4906 } else { 4900 set_ write_time_path(conn, fname,4907 set_sticky_write_time_path(conn, fname, 4901 4908 vfs_file_id_from_sbuf(conn, psbuf), 4902 ts[1] , true);4909 ts[1]); 4903 4910 } 4904 4911 } … … 4992 4999 return map_nt_error_from_unix(errno); 4993 5000 } 5001 trigger_write_time_update_immediate(fsp); 4994 5002 return NT_STATUS_OK; 4995 5003 } … … 5015 5023 } 5016 5024 5025 trigger_write_time_update_immediate(new_fsp); 5017 5026 close_file(new_fsp,NORMAL_CLOSE); 5018 5027 return NT_STATUS_OK; … … 5740 5749 * if there are no pending writes. 5741 5750 */ 5742 trigger_write_time_update (fsp);5751 trigger_write_time_update_immediate(fsp); 5743 5752 return NT_STATUS_OK; 5744 5753 } … … 5774 5783 * if there are no pending writes. 5775 5784 */ 5776 trigger_write_time_update (new_fsp);5785 trigger_write_time_update_immediate(new_fsp); 5777 5786 5778 5787 close_file(new_fsp,NORMAL_CLOSE);
Note:
See TracChangeset
for help on using the changeset viewer.