summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-08-19 02:18:48 +0000
committerGerald Carter <jerry@samba.org>2002-08-19 02:18:48 +0000
commit2b93ecc90b79d95455b19e46082f1b0039b71e35 (patch)
tree473e2e049c52aee068e74f21dc60c11a3d472093 /source3
parente612804c15e7be7fa9313054c42c161e1bed38bf (diff)
downloadsamba-2b93ecc90b79d95455b19e46082f1b0039b71e35.tar.gz
samba-2b93ecc90b79d95455b19e46082f1b0039b71e35.tar.bz2
samba-2b93ecc90b79d95455b19e46082f1b0039b71e35.zip
added wrapper for delete_printer_data() that write the printer out to disk.
(This used to be commit 113d960d77fc9e3671a448d093237ced25c2e18c)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 834ad7f61a..ae478d7c68 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1735,6 +1735,17 @@ static WERROR get_printer_dataex( TALLOC_CTX *ctx, NT_PRINTER_INFO_LEVEL *printe
}
/****************************************************************************
+ Internal routine for removing printerdata
+ ***************************************************************************/
+
+static WERROR delete_printer_dataex( NT_PRINTER_INFO_LEVEL *printer, char *key, char *value )
+{
+ delete_printer_data( printer->info_2, key, value );
+
+ return mod_a_printer(*printer, 2);
+}
+
+/****************************************************************************
Internal routine for storing printerdata
***************************************************************************/
@@ -7211,9 +7222,7 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_
unistr2_to_ascii( valuename, value, sizeof(valuename)-1 );
- status = delete_printer_data( printer->info_2, SPOOL_PRINTERDATA_KEY, valuename );
- if ( W_ERROR_IS_OK(status) )
- status = mod_a_printer(*printer, 2);
+ status = delete_printer_dataex( printer, SPOOL_PRINTERDATA_KEY, valuename );
free_a_printer(&printer, 2);
@@ -7894,7 +7903,7 @@ done:
}
/********************************************************************
- * spoolss_setprinterdata
+ * spoolss_setprinterdataex
********************************************************************/
WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, SPOOL_R_SETPRINTERDATAEX *r_u)
@@ -7993,9 +8002,7 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX
unistr2_to_ascii( valuename, value, sizeof(valuename)-1 );
unistr2_to_ascii( keyname, key, sizeof(keyname)-1 );
- status = delete_printer_data( printer->info_2, keyname, valuename );
- if ( W_ERROR_IS_OK(status) )
- status = mod_a_printer(*printer, 2);
+ status = delete_printer_dataex( printer, keyname, valuename );
free_a_printer(&printer, 2);
@@ -8116,6 +8123,7 @@ WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u,
unistr2_to_ascii(key, &q_u->keyname, sizeof(key) - 1);
status = delete_all_printer_data( printer->info_2, key );
+
if ( W_ERROR_IS_OK(status) )
status = mod_a_printer(*printer, 2);