From 1ad8139ef1f9d54b4204f3db67de45e7ac7ee813 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 4 Dec 2002 01:14:34 +0000 Subject: [merge from app_head] XP sends GetPrinterData("ChangeId"). So we now respond accordingly. Possible fix for CR 1147. (This used to be commit 42a2e7d701fd342f2553660eb5094af8723fb50e) --- source3/rpc_server/srv_spoolss_nt.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source3') 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) -- cgit