diff options
author | Gerald Carter <jerry@samba.org> | 2002-03-15 08:14:10 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-03-15 08:14:10 +0000 |
commit | 65c007b583e2107f5ad1ba6733d3e578a143863e (patch) | |
tree | a11e1da607580d291ce74926417126ce22f34852 /source3/rpc_server/srv_spoolss.c | |
parent | d19e06c0c620046658621fcec7c2cda9a77ceac3 (diff) | |
download | samba-65c007b583e2107f5ad1ba6733d3e578a143863e.tar.gz samba-65c007b583e2107f5ad1ba6733d3e578a143863e.tar.bz2 samba-65c007b583e2107f5ad1ba6733d3e578a143863e.zip |
syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).
* add in new printer change notify code from SAMBA_2_2
* add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()
* sync up the _print_queue_struct in smb.h (why did someone change the
user/file names in fs_user/fs_file (or vice-versa) ? )
* sync up some cli_spoolss_XXX functions
(This used to be commit 5760315c1de4033fdc22684c940f18010010924f)
Diffstat (limited to 'source3/rpc_server/srv_spoolss.c')
-rwxr-xr-x | source3/rpc_server/srv_spoolss.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c index 3f3c6039c9..3838632021 100755 --- a/source3/rpc_server/srv_spoolss.c +++ b/source3/rpc_server/srv_spoolss.c @@ -975,7 +975,33 @@ static BOOL api_spoolss_setprinterdata(pipes_struct *p) /**************************************************************************** ****************************************************************************/ +static BOOL api_spoolss_reset_printer(pipes_struct *p) +{ + SPOOL_Q_RESETPRINTER q_u; + SPOOL_R_RESETPRINTER r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!spoolss_io_q_resetprinter("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_setprinterdata: unable to unmarshall SPOOL_Q_SETPRINTERDATA.\n")); + return False; + } + + r_u.status = _spoolss_resetprinter(p, &q_u, &r_u); + + if(!spoolss_io_r_resetprinter("", &r_u, rdata, 0)) { + DEBUG(0,("spoolss_io_r_setprinterdata: unable to marshall SPOOL_R_RESETPRINTER.\n")); + return False; + } + + return True; +} +/**************************************************************************** +****************************************************************************/ static BOOL api_spoolss_addform(pipes_struct *p) { SPOOL_Q_ADDFORM q_u; @@ -1318,11 +1344,6 @@ static BOOL api_spoolss_enumprinterdataex(pipes_struct *p) /**************************************************************************** ****************************************************************************/ -/* Disabled because it doesn't fix the bug I am looking at but it would be - a shame to throw away the code. -tpot */ - -#if 0 - static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p) { SPOOL_Q_GETPRINTPROCESSORDIRECTORY q_u; @@ -1348,8 +1369,6 @@ static BOOL api_spoolss_getprintprocessordirectory(pipes_struct *p) return True; } -#endif - /******************************************************************* \pipe\spoolss commands ********************************************************************/ @@ -1386,6 +1405,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_RESETPRINTER", SPOOLSS_RESETPRINTER, api_spoolss_reset_printer }, {"SPOOLSS_DELETEPRINTERDATA", SPOOLSS_DELETEPRINTERDATA, api_spoolss_deleteprinterdata }, {"SPOOLSS_ADDFORM", SPOOLSS_ADDFORM, api_spoolss_addform }, {"SPOOLSS_DELETEFORM", SPOOLSS_DELETEFORM, api_spoolss_deleteform }, |