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 | fd3acf437acb923757e1b59b503c864b4d1c45cc (patch) | |
tree | 74b937fdf141db10b6a0f6199c38da47b1fffb71 /source3/rpc_server/srv_spoolss_nt.c | |
parent | badee62bca8b81db7ede74ac8ea7710b14a07b4c (diff) | |
download | samba-fd3acf437acb923757e1b59b503c864b4d1c45cc.tar.gz samba-fd3acf437acb923757e1b59b503c864b4d1c45cc.tar.bz2 samba-fd3acf437acb923757e1b59b503c864b4d1c45cc.zip |
added enumprintprocessordatatypes
now NT is happy and the "always send data in RAW mode" is checked
J.F.
(This used to be commit d7bcfe17cee64a513595d7c44456e93e88f2448b)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 3ab426e9c2..90a0ef6d60 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3849,7 +3849,56 @@ uint32 _spoolss_enumprintprocessors(UNISTR2 *name, UNISTR2 *environment, uint32 return NT_STATUS_INVALID_INFO_CLASS; break; } +} + +/**************************************************************************** + enumprintprocdatatypes level 1. +****************************************************************************/ +static uint32 enumprintprocdatatypes_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *needed, uint32 *returned) +{ + PRINTPROCDATATYPE_1 *info_1=NULL; + + info_1 = (PRINTPROCDATATYPE_1 *)malloc(sizeof(PRINTPROCDATATYPE_1)); + (*returned) = 0x1; + + init_unistr(&(info_1->name), "RAW"); + + *needed += spoolss_size_printprocdatatype_info_1(info_1); + + if (!alloc_buffer_size(buffer, *needed)) + return ERROR_INSUFFICIENT_BUFFER; + + smb_io_printprocdatatype_info_1("", buffer, info_1, 0); + + safe_free(info_1); + + if (*needed > offered) { + *returned=0; + return ERROR_INSUFFICIENT_BUFFER; + } + else + return NT_STATUS_NO_PROBLEMO; +} +/**************************************************************************** +****************************************************************************/ +uint32 _spoolss_enumprintprocdatatypes(UNISTR2 *name, UNISTR2 *processor, uint32 level, + NEW_BUFFER *buffer, uint32 offered, + uint32 *needed, uint32 *returned) +{ + DEBUG(5,("_spoolss_enumprintprocdatatypes\n")); + + *returned=0; + *needed=0; + + switch (level) { + case 1: + return enumprintprocdatatypes_level_1(buffer, offered, needed, returned); + break; + default: + return NT_STATUS_INVALID_INFO_CLASS; + break; + } } /**************************************************************************** |