summaryrefslogtreecommitdiff
path: root/source4/ntvfs/print
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-04 02:03:06 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-04 02:03:06 +0000
commit926240428c0646aabb13539745940b61a7cf44a9 (patch)
tree102988d47fab4a56b59161409dddc9c9dfa86ed5 /source4/ntvfs/print
parentb8cbd9181efabbc360ef335e214a696011839b41 (diff)
downloadsamba-926240428c0646aabb13539745940b61a7cf44a9.tar.gz
samba-926240428c0646aabb13539745940b61a7cf44a9.tar.bz2
samba-926240428c0646aabb13539745940b61a7cf44a9.zip
* patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions * added SMBntrename code (This used to be commit f2d3dc9893fa0e089c407fa16ce9ff13587e70cd)
Diffstat (limited to 'source4/ntvfs/print')
-rw-r--r--source4/ntvfs/print/vfs_print.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index 82829d759a..a9484d4329 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -54,17 +54,21 @@ static NTSTATUS print_unlink(struct request_context *req, struct smb_unlink *unl
/*
ioctl - used for job query
*/
-static NTSTATUS print_ioctl(struct request_context *req, struct smb_ioctl *io)
+static NTSTATUS print_ioctl(struct request_context *req, union smb_ioctl *io)
{
char *p;
- if (io->in.request == IOCTL_QUERY_JOB_INFO) {
+ if (io->generic.level != RAW_IOCTL_IOCTL) {
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
+ if (io->ioctl.in.request == IOCTL_QUERY_JOB_INFO) {
/* a request for the print job id of an open print job */
- io->out.blob = data_blob_talloc(req->mem_ctx, NULL, 32);
+ io->ioctl.out.blob = data_blob_talloc(req->mem_ctx, NULL, 32);
- memset(io->out.blob.data, 0, io->out.blob.length);
+ data_blob_clear(&io->ioctl.out.blob);
- p = io->out.blob.data;
+ p = io->ioctl.out.blob.data;
SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */);
push_string(NULL, p+2, lp_netbios_name(), 15, STR_TERMINATE|STR_ASCII);
push_string(NULL, p+18, lp_servicename(req->conn->service), 13, STR_TERMINATE|STR_ASCII);