summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-04-22 23:52:33 +0200
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:09 -0400
commit90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4 (patch)
treee65552e405fd83925cd8982074806d92255f3f59 /source3/rpc_server
parentbe6dc65b9e1b96872a10d3622b345d6be35872ef (diff)
downloadsamba-90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4.tar.gz
samba-90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4.tar.bz2
samba-90e96d3ee20caf4aa58ea87a3afc5013f31d0ae4.zip
s3-spoolss: Migrated spoolss_DeletePrinter to cleanup winreg keys.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c8
1 files changed, 8 insertions, 0 deletions
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);