summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-18 19:00:29 +0100
committerGünther Deschner <gd@samba.org>2009-02-19 19:26:54 +0100
commit38fde6d5d9abd7faf5053c746acebba342c5d335 (patch)
treeb0637099e4003440660e6afeac5887110bbe8a82 /source3/rpc_parse/parse_spoolss.c
parent0470feeb7f40e31b9fc899988a55b19bd1290d9e (diff)
downloadsamba-38fde6d5d9abd7faf5053c746acebba342c5d335.tar.gz
s3-spoolss: remove old spoolss_AddPrinterDriver{Ex}.
Guenther
Diffstat (limited to 'source3/rpc_parse/parse_spoolss.c')
-rw-r--r--source3/rpc_parse/parse_spoolss.c185
1 files changed, 0 insertions, 185 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index b798eef4550..577ba73a42c 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -3859,47 +3859,6 @@ bool spool_io_printer_driver_info_level_6(const char *desc, SPOOL_PRINTER_DRIVER
}
/*******************************************************************
- convert a buffer of UNICODE strings null terminated
- the buffer is terminated by a NULL
-
- convert to an dos codepage array (null terminated)
-
- dynamically allocate memory
-
-********************************************************************/
-
-static bool uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
-{
- fstring f;
- int n = 0;
- char *src;
-
- if (buf5==NULL)
- return False;
-
- src = (char *)buf5->buffer;
- *ar = SMB_MALLOC_ARRAY(fstring, 1);
- if (!*ar) {
- return False;
- }
-
- while (src < ((char *)buf5->buffer) + buf5->buf_len*2) {
- rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
- src = skip_unibuf(src, 2*buf5->buf_len - PTR_DIFF(src,buf5->buffer));
- *ar = SMB_REALLOC_ARRAY(*ar, fstring, n+2);
- if (!*ar) {
- return False;
- }
- fstrcpy((*ar)[n], f);
- n++;
- }
-
- fstrcpy((*ar)[n], "");
-
- return True;
-}
-
-/*******************************************************************
read a UNICODE array with null terminated strings
and null terminated array
and size of array at beginning
@@ -4125,152 +4084,8 @@ bool spoolss_io_r_addprinterdriver(const char *desc, SPOOL_R_ADDPRINTERDRIVER *q
}
/*******************************************************************
- fill in the prs_struct for a ADDPRINTERDRIVER request PDU
********************************************************************/
-bool spoolss_io_q_addprinterdriverex(const char *desc, SPOOL_Q_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_q_addprinterdriverex");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("server_name_ptr", ps, depth, &q_u->server_name_ptr))
- return False;
- if(!smb_io_unistr2("server_name", &q_u->server_name, q_u->server_name_ptr, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
- if(!prs_uint32("info_level", ps, depth, &q_u->level))
- return False;
-
- if(!spool_io_printer_driver_info_level("", &q_u->info, ps, depth))
- return False;
-
- if(!prs_align(ps))
- return False;
- if(!prs_uint32("copy flags", ps, depth, &q_u->copy_flags))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool spoolss_io_r_addprinterdriverex(const char *desc, SPOOL_R_ADDPRINTERDRIVEREX *q_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriverex");
- depth++;
-
- if(!prs_werror("status", ps, depth, &q_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-********************************************************************/
-
-bool uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni,
- NT_PRINTER_DRIVER_INFO_LEVEL_3 **asc)
-{
- NT_PRINTER_DRIVER_INFO_LEVEL_3 *d;
-
- DEBUG(7,("uni_2_asc_printer_driver_3: Converting from UNICODE to ASCII\n"));
-
- if (*asc==NULL)
- {
- *asc=SMB_MALLOC_P(NT_PRINTER_DRIVER_INFO_LEVEL_3);
- if(*asc == NULL)
- return False;
- ZERO_STRUCTP(*asc);
- }
-
- d=*asc;
-
- d->cversion=uni->cversion;
-
- unistr2_to_ascii(d->name, &uni->name, sizeof(d->name));
- unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment));
- unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath));
- unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile));
- unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile));
- unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile));
- unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname));
- unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
-
- DEBUGADD(8,( "version: %d\n", d->cversion));
- DEBUGADD(8,( "name: %s\n", d->name));
- DEBUGADD(8,( "environment: %s\n", d->environment));
- DEBUGADD(8,( "driverpath: %s\n", d->driverpath));
- DEBUGADD(8,( "datafile: %s\n", d->datafile));
- DEBUGADD(8,( "configfile: %s\n", d->configfile));
- DEBUGADD(8,( "helpfile: %s\n", d->helpfile));
- DEBUGADD(8,( "monitorname: %s\n", d->monitorname));
- DEBUGADD(8,( "defaultdatatype: %s\n", d->defaultdatatype));
-
- if (uniarray_2_dosarray(&uni->dependentfiles, &d->dependentfiles ))
- return True;
-
- SAFE_FREE(*asc);
- return False;
-}
-
-/*******************************************************************
-********************************************************************/
-bool uni_2_asc_printer_driver_6(SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *uni,
- NT_PRINTER_DRIVER_INFO_LEVEL_6 **asc)
-{
- NT_PRINTER_DRIVER_INFO_LEVEL_6 *d;
-
- DEBUG(7,("uni_2_asc_printer_driver_6: Converting from UNICODE to ASCII\n"));
-
- if (*asc==NULL)
- {
- *asc=SMB_MALLOC_P(NT_PRINTER_DRIVER_INFO_LEVEL_6);
- if(*asc == NULL)
- return False;
- ZERO_STRUCTP(*asc);
- }
-
- d=*asc;
-
- d->version=uni->version;
-
- unistr2_to_ascii(d->name, &uni->name, sizeof(d->name));
- unistr2_to_ascii(d->environment, &uni->environment, sizeof(d->environment));
- unistr2_to_ascii(d->driverpath, &uni->driverpath, sizeof(d->driverpath));
- unistr2_to_ascii(d->datafile, &uni->datafile, sizeof(d->datafile));
- unistr2_to_ascii(d->configfile, &uni->configfile, sizeof(d->configfile));
- unistr2_to_ascii(d->helpfile, &uni->helpfile, sizeof(d->helpfile));
- unistr2_to_ascii(d->monitorname, &uni->monitorname, sizeof(d->monitorname));
- unistr2_to_ascii(d->defaultdatatype, &uni->defaultdatatype, sizeof(d->defaultdatatype));
-
- DEBUGADD(8,( "version: %d\n", d->version));
- DEBUGADD(8,( "name: %s\n", d->name));
- DEBUGADD(8,( "environment: %s\n", d->environment));
- DEBUGADD(8,( "driverpath: %s\n", d->driverpath));
- DEBUGADD(8,( "datafile: %s\n", d->datafile));
- DEBUGADD(8,( "configfile: %s\n", d->configfile));
- DEBUGADD(8,( "helpfile: %s\n", d->helpfile));
- DEBUGADD(8,( "monitorname: %s\n", d->monitorname));
- DEBUGADD(8,( "defaultdatatype: %s\n", d->defaultdatatype));
-
- if (!uniarray_2_dosarray(&uni->dependentfiles, &d->dependentfiles ))
- goto error;
- if (!uniarray_2_dosarray(&uni->previousnames, &d->previousnames ))
- goto error;
-
- return True;
-
-error:
- SAFE_FREE(*asc);
- return False;
-}
-
bool uni_2_asc_printer_info_2(const SPOOL_PRINTER_INFO_LEVEL_2 *uni,
NT_PRINTER_INFO_LEVEL_2 *d)
{