diff options
author | Jean-François Micouleau <jfm@samba.org> | 2000-02-26 23:01:02 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2000-02-26 23:01:02 +0000 |
commit | d7bcfe17cee64a513595d7c44456e93e88f2448b (patch) | |
tree | a62612f33ec405738ebc6eee1195fe20f6870909 /source/rpc_server/srv_spoolss.c | |
parent | b76ae1f92f4f12b38c4245456cdd2db970724077 (diff) | |
download | samba-d7bcfe17cee64a513595d7c44456e93e88f2448b.tar.gz |
added enumprintprocessordatatypes
now NT is happy and the "always send data in RAW mode" is checked
J.F.
Diffstat (limited to 'source/rpc_server/srv_spoolss.c')
-rwxr-xr-x | source/rpc_server/srv_spoolss.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/rpc_server/srv_spoolss.c b/source/rpc_server/srv_spoolss.c index d20f6c1616f..75493b7a303 100755 --- a/source/rpc_server/srv_spoolss.c +++ b/source/rpc_server/srv_spoolss.c @@ -968,6 +968,41 @@ static BOOL api_spoolss_enumprintprocessors(uint16 vuid, prs_struct *data, prs_s /**************************************************************************** ****************************************************************************/ +static BOOL api_spoolss_enumprintprocdatatypes(uint16 vuid, prs_struct *data, prs_struct *rdata) +{ + SPOOL_Q_ENUMPRINTPROCDATATYPES q_u; + SPOOL_R_ENUMPRINTPROCDATATYPES r_u; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + new_spoolss_allocate_buffer(&q_u.buffer); + + if(!spoolss_io_q_enumprintprocdatatypes("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_enumprintprocdatatypes: unable to unmarshall SPOOL_Q_ENUMPRINTPROCDATATYPES.\n")); + return False; + } + + /* that's an [in out] buffer */ + new_spoolss_move_buffer(q_u.buffer, &r_u.buffer); + + r_u.status = _spoolss_enumprintprocdatatypes(&q_u.name, &q_u.processor, q_u.level, + r_u.buffer, q_u.offered, + &r_u.needed, &r_u.returned); + + if(!spoolss_io_r_enumprintprocdatatypes("", &r_u, rdata, 0)) { + DEBUG(0,("spoolss_io_r_enumprintprocdatatypes: unable to marshall SPOOL_R_ENUMPRINTPROCDATATYPES.\n")); + new_spoolss_free_buffer(q_u.buffer); + return False; + } + + new_spoolss_free_buffer(q_u.buffer); + + return True; +} + +/**************************************************************************** +****************************************************************************/ static BOOL api_spoolss_enumprintmonitors(uint16 vuid, prs_struct *data, prs_struct *rdata) { SPOOL_Q_ENUMPRINTMONITORS q_u; @@ -1069,6 +1104,7 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_ENUMPRINTPROCESSORS", SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_enumprintprocessors }, {"SPOOLSS_ENUMMONITORS", SPOOLSS_ENUMMONITORS, api_spoolss_enumprintmonitors }, {"SPOOLSS_GETJOB", SPOOLSS_GETJOB, api_spoolss_getjob }, + {"SPOOLSS_ENUMPRINTPROCDATATYPES", SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_enumprintprocdatatypes }, { NULL, 0, NULL } }; |