s3-spoolss: fix spoolss GetPrinterData behaviour
authorDavid Disseldorp <ddiss@suse.de>
Fri, 5 Nov 2010 14:24:22 +0000 (15:24 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 10 Nov 2010 14:23:22 +0000 (15:23 +0100)
commit1c579318ae2d2480ee4cc998443c0d1661b39846
tree3eee6db1d778d0caa75d2a17ab03518d854351f4
parentfa0b44ed9c31baf19c70aa47a25233c947c0ae05
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>
source3/rpc_server/srv_spoolss_nt.c