summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-12-04 01:14:34 +0000
committerGerald Carter <jerry@samba.org>2002-12-04 01:14:34 +0000
commit1ad8139ef1f9d54b4204f3db67de45e7ac7ee813 (patch)
tree886f966ced978eac88d25fbf8f24bdad073e067d
parente7f2ae9c7ff8108d9a5f4ad87b055ddb42466383 (diff)
downloadsamba-1ad8139ef1f9d54b4204f3db67de45e7ac7ee813.tar.gz
samba-1ad8139ef1f9d54b4204f3db67de45e7ac7ee813.tar.bz2
samba-1ad8139ef1f9d54b4204f3db67de45e7ac7ee813.zip
[merge from app_head]
XP sends GetPrinterData("ChangeId"). So we now respond accordingly. Possible fix for CR 1147. (This used to be commit 42a2e7d701fd342f2553660eb5094af8723fb50e)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index ce877841d3..126427258f 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2292,8 +2292,21 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO
status = get_a_printer(&printer, 2, lp_servicename(snum));
if ( !W_ERROR_IS_OK(status) )
goto done;
-
- status = get_printer_dataex( p->mem_ctx, printer, SPOOL_PRINTERDATA_KEY, value, type, data, needed, *out_size );
+
+ /* XP sends this and wants to change id value from the PRINTER_INFO_0 */
+
+ if ( strequal(value, "ChangeId") ) {
+ *type = REG_DWORD;
+ *needed = sizeof(uint32);
+ if ( (*data = (uint8*)talloc(p->mem_ctx, sizeof(uint32))) == NULL) {
+ status = WERR_NOMEM;
+ goto done;
+ }
+ **data = printer->info_2->changeid;
+ status = WERR_OK;
+ }
+ else
+ status = get_printer_dataex( p->mem_ctx, printer, SPOOL_PRINTERDATA_KEY, value, type, data, needed, *out_size );
}
if (*needed > *out_size)