summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-12-04 01:15:50 +0000
committerGerald Carter <jerry@samba.org>2002-12-04 01:15:50 +0000
commita850e90080cd12fa3c8b92028c8984164494f508 (patch)
tree1b5d8c194c31974263cfb031742bfd4a2af89f34 /source3
parent5ed2d4a1d386d42920bdf97e139eea9bbaaa274b (diff)
downloadsamba-a850e90080cd12fa3c8b92028c8984164494f508.tar.gz
samba-a850e90080cd12fa3c8b92028c8984164494f508.tar.bz2
samba-a850e90080cd12fa3c8b92028c8984164494f508.zip
[merge from app_head]
XP sends GetPrinterData("ChangeId"). So we now respond accordingly. Possible fix for CR 1147. (This used to be commit 9424a3b1d1bf11bf38e2bdfd20f1537cf97400ca)
Diffstat (limited to 'source3')
-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 ad55ea6a49..9e4b31813f 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)