summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-30 15:27:26 -0700
committerJeremy Allison <jra@samba.org>2010-03-30 15:27:26 -0700
commit32c8feab5d8320cba7f47fc27ba0fc264f3c4333 (patch)
tree1d1c304025914cb341097c790e2fe4e60c0fce5a /source3/smbd
parent4b249a616b586bf384e0ba68ce5d391601879938 (diff)
downloadsamba-32c8feab5d8320cba7f47fc27ba0fc264f3c4333.tar.gz
samba-32c8feab5d8320cba7f47fc27ba0fc264f3c4333.tar.bz2
samba-32c8feab5d8320cba7f47fc27ba0fc264f3c4333.zip
Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.
Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter confirms this fixes the problem. Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 1c99aec04f..fdcf4870e8 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3822,7 +3822,9 @@ void reply_writebraw(struct smb_request *req)
return;
}
- if (!fsp->print_file) {
+ if (fsp->print_file) {
+ startpos = printfile_offset(fsp, startpos);
+ } else {
init_strict_lock_struct(fsp, (uint32)req->smbpid,
(uint64_t)startpos, (uint64_t)tcount, WRITE_LOCK,
&lock);
@@ -4024,7 +4026,9 @@ void reply_writeunlock(struct smb_request *req)
startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0);
data = (const char *)req->buf + 3;
- if (numtowrite && !fsp->print_file) {
+ if (fsp->print_file) {
+ startpos = printfile_offset(fsp, startpos);
+ } else if (numtowrite) {
init_strict_lock_struct(fsp, (uint32)req->smbpid,
(uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
&lock);
@@ -4145,7 +4149,9 @@ void reply_write(struct smb_request *req)
startpos = IVAL_TO_SMB_OFF_T(req->vwv+2, 0);
data = (const char *)req->buf + 3;
- if (!fsp->print_file) {
+ if (fsp->print_file) {
+ startpos = printfile_offset(fsp, startpos);
+ } else {
init_strict_lock_struct(fsp, (uint32)req->smbpid,
(uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
&lock);
@@ -4751,7 +4757,9 @@ void reply_writeclose(struct smb_request *req)
mtime = convert_time_t_to_timespec(srv_make_unix_date3(req->vwv+4));
data = (const char *)req->buf + 1;
- if (numtowrite && !fsp->print_file) {
+ if (fsp->print_file) {
+ startpos = printfile_offset(fsp, startpos);
+ } else if (numtowrite) {
init_strict_lock_struct(fsp, (uint32)req->smbpid,
(uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
&lock);