diff options
author | Gerald Carter <jerry@samba.org> | 2000-07-31 14:56:01 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-07-31 14:56:01 +0000 |
commit | f9d3ff99fda642bc0a0a4cd0eeb838df29ea4df6 (patch) | |
tree | 78981b7f724bbd7838705216a2af2f61493f20a0 /source3/rpc_parse | |
parent | a6ef985df4a51c72dc9fc8bebbb9773098e702d6 (diff) | |
download | samba-f9d3ff99fda642bc0a0a4cd0eeb838df29ea4df6.tar.gz samba-f9d3ff99fda642bc0a0a4cd0eeb838df29ea4df6.tar.bz2 samba-f9d3ff99fda642bc0a0a4cd0eeb838df29ea4df6.zip |
More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic
memory allocation when unmarshalling unistr[2]
* included EnumPorts level 1
* more work on AddPrinterEx
--jerry
(This used to be commit d321d0dddd052b49c94bef8f214be7343337d907)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index af946f376a..2adfc65eeb 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -1814,7 +1814,7 @@ BOOL new_smb_io_printer_info_2(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_2 *i return False; #if 1 /* JFMTEST */ - if (!prs_uint32_pre("secdesc_ptr ", ps, depth, NULL, &sec_offset)) + if (!prs_uint32_pre("secdesc_ptr ", ps, depth, &i, &sec_offset)) return False; #else if (!new_smb_io_relsecdesc("secdesc", buffer, depth, &info->secdesc)) @@ -1869,13 +1869,31 @@ BOOL new_smb_io_printer_info_3(char *desc, NEW_BUFFER *buffer, PRINTER_INFO_3 *i } /******************************************************************* - Parse a PRINTER_INFO_3 structure. + Parse a PORT_INFO_1 structure. +********************************************************************/ +BOOL new_smb_io_port_info_1(char *desc, NEW_BUFFER *buffer, PORT_INFO_1 *info, int depth) +{ + prs_struct *ps=&(buffer->prs); + + prs_debug(ps, depth, desc, "new_smb_io_port_info_1"); + depth++; + + buffer->struct_start=prs_offset(ps); + + if (!new_smb_io_relstr("port_name", buffer, depth, &info->port_name)) + return False; + + return True; +} + +/******************************************************************* + Parse a PORT_INFO_2 structure. ********************************************************************/ BOOL new_smb_io_port_info_2(char *desc, NEW_BUFFER *buffer, PORT_INFO_2 *info, int depth) { prs_struct *ps=&(buffer->prs); - prs_debug(ps, depth, desc, "new_smb_io_printer_info_3"); + prs_debug(ps, depth, desc, "new_smb_io_port_info_2"); depth++; buffer->struct_start=prs_offset(ps); @@ -3665,10 +3683,7 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s */ case 0: break; - /* - * level 2 is used by addprinter - * and by setprinter when updating printer's info - */ + /* DOCUMENT ME!!! What is level 1 used for? */ case 1: { if (UNMARSHALLING(ps)) { @@ -3683,6 +3698,10 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s } break; } + /* + * level 2 is used by addprinter + * and by setprinter when updating printer's info + */ case 2: if (UNMARSHALLING(ps)) { if ((il->info_2=(SPOOL_PRINTER_INFO_LEVEL_2 *)malloc(sizeof(SPOOL_PRINTER_INFO_LEVEL_2))) == NULL) @@ -3695,6 +3714,7 @@ BOOL spool_io_printer_info_level(char *desc, SPOOL_PRINTER_INFO_LEVEL *il, prs_s return False; } break; + /* DOCUMENT ME!!! What is level 3 used for? */ case 3: { if (UNMARSHALLING(ps)) { |