summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0355cb70833..56c067f4dc4 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -924,7 +924,12 @@ void reply_ioctl(struct smb_request *req)
END_PROFILE(SMBioctl);
return;
}
- SSVAL(p,0,fsp->rap_print_jobid); /* Job number */
+ /* Job number */
+ if (fsp->print_file) {
+ SSVAL(p, 0, fsp->print_file->rap_jobid);
+ } else {
+ SSVAL(p, 0, 0);
+ }
srvstr_push((char *)req->outbuf, req->flags2, p+2,
global_myname(), 15,
STR_TERMINATE|STR_ASCII);