From 90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Apr 2010 23:52:33 +0200 Subject: s3-spoolss: Migrated spoolss_DeletePrinter to cleanup winreg keys. Signed-off-by: Jim McDonough --- source3/rpc_server/srv_spoolss_nt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 0063502cfc..cc2a35a5bb 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1694,6 +1694,7 @@ WERROR _spoolss_DeletePrinter(pipes_struct *p, { Printer_entry *Printer = find_printer_index_by_hnd(p, r->in.handle); WERROR result; + int snum; if (Printer && Printer->document_started) { struct spoolss_EndDocPrinter e; @@ -1703,6 +1704,13 @@ WERROR _spoolss_DeletePrinter(pipes_struct *p, _spoolss_EndDocPrinter(p, &e); } + if (get_printer_snum(p, r->in.handle, &snum, NULL)) { + winreg_delete_printer_key(p->mem_ctx, + p->server_info, + lp_const_servicename(snum), + ""); + } + result = delete_printer_handle(p, r->in.handle); update_c_setprinter(false); -- cgit