summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-09 00:19:35 +0000
committerJeremy Allison <jra@samba.org>2000-09-09 00:19:35 +0000
commite0f9de0c49dde82610b0da406b4685e787f69725 (patch)
tree3effbc84094e2fb2f5dcfad07d587e97e4f20126 /source3/rpc_server/srv_spoolss.c
parent588d802877ec5c1969d8f0a79875382bfa91c032 (diff)
downloadsamba-e0f9de0c49dde82610b0da406b4685e787f69725.tar.gz
samba-e0f9de0c49dde82610b0da406b4685e787f69725.tar.bz2
samba-e0f9de0c49dde82610b0da406b4685e787f69725.zip
Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy. (This used to be commit fb48efaf830626f6ef05b88f5f8a74b932ceb257)
Diffstat (limited to 'source3/rpc_server/srv_spoolss.c')
-rwxr-xr-xsource3/rpc_server/srv_spoolss.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c
index fd6cf11746..72ce17fee1 100755
--- a/source3/rpc_server/srv_spoolss.c
+++ b/source3/rpc_server/srv_spoolss.c
@@ -100,6 +100,37 @@ static BOOL api_spoolss_getprinterdata(pipes_struct *p)
}
/********************************************************************
+ * api_spoolss_deleteprinterdata
+ *
+ * called from the spoolss dispatcher
+ ********************************************************************/
+static BOOL api_spoolss_deleteprinterdata(pipes_struct *p)
+{
+ SPOOL_Q_DELETEPRINTERDATA q_u;
+ SPOOL_R_DELETEPRINTERDATA r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ /* read the stream and fill the struct */
+ if (!spoolss_io_q_deleteprinterdata("", &q_u, data, 0)) {
+ DEBUG(0,("spoolss_io_q_deleteprinterdata: unable to unmarshall SPOOL_Q_DELETEPRINTERDATA.\n"));
+ return False;
+ }
+
+ r_u.status = _spoolss_deleteprinterdata( &q_u.handle, &q_u.valuename);
+
+ if (!spoolss_io_r_deleteprinterdata("", &r_u, rdata, 0)) {
+ DEBUG(0,("spoolss_io_r_deleteprinterdata: unable to marshall SPOOL_R_DELETEPRINTERDATA.\n"));
+ return False;
+ }
+
+ return True;
+}
+
+/********************************************************************
* api_spoolss_closeprinter
*
* called from the spoolss dispatcher
@@ -1328,6 +1359,7 @@ struct api_struct api_spoolss_cmds[] =
{"SPOOLSS_GETPRINTERDRIVERDIRECTORY", SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_getprinterdriverdirectory },
{"SPOOLSS_ENUMPRINTERDATA", SPOOLSS_ENUMPRINTERDATA, api_spoolss_enumprinterdata },
{"SPOOLSS_SETPRINTERDATA", SPOOLSS_SETPRINTERDATA, api_spoolss_setprinterdata },
+ {"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata },
{"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform },
{"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform },
{"SPOOLSS_GETFORM", SPOOLSS_GETFORM, api_spoolss_getform },