summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2010-11-05 15:24:22 +0100
committerGünther Deschner <gd@samba.org>2010-11-10 15:23:22 +0100
commit1c579318ae2d2480ee4cc998443c0d1661b39846 (patch)
tree3eee6db1d778d0caa75d2a17ab03518d854351f4 /source3/rpc_server
parentfa0b44ed9c31baf19c70aa47a25233c947c0ae05 (diff)
downloadsamba-1c579318ae2d2480ee4cc998443c0d1661b39846.tar.gz
samba-1c579318ae2d2480ee4cc998443c0d1661b39846.tar.bz2
samba-1c579318ae2d2480ee4cc998443c0d1661b39846.zip
s3-spoolss: fix spoolss GetPrinterData behaviour
Windows sends spoolss GetPrinterData requests with an offered buffer size of zero, Model and TrayFormTable data is commonly requested in this way. Samba's GetPrinterData response for the above case includes the correct error code (WERR_MORE_DATA), however the type field is set to REG_NONE. This causes Windows (seen on XP and 2k3) to give up on the request. If the type field is retained (not set to REG_NONE) when responding with WERR_MORE_DATA, Windows reissues the GetPrinterData request with an increased offered buffer size. Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index aafba01ef4..c0f953bdf4 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9222,7 +9222,7 @@ WERROR _spoolss_GetPrinterDataEx(struct pipes_struct *p,
}
done:
- *r->out.type = SPOOLSS_BUFFER_OK(*r->out.type, REG_NONE);
+ /* retain type when returning WERR_MORE_DATA */
r->out.data = SPOOLSS_BUFFER_OK(r->out.data, r->out.data);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_MORE_DATA);