summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 8f43793a53..6f6d9ce0c0 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1400,92 +1400,6 @@ void reset_all_printerdata(struct messaging_context *msg,
}
/********************************************************************
- Copy routines used by convert_to_openprinterex()
- *******************************************************************/
-
-static DEVICEMODE* dup_devicemode(TALLOC_CTX *ctx, DEVICEMODE *devmode)
-{
- DEVICEMODE *d;
- int len;
-
- if (!devmode)
- return NULL;
-
- DEBUG (8,("dup_devmode\n"));
-
- /* bulk copy first */
-
- d = (DEVICEMODE *)TALLOC_MEMDUP(ctx, devmode, sizeof(DEVICEMODE));
- if (!d)
- return NULL;
-
- /* dup the pointer members separately */
-
- len = unistrlen(devmode->devicename.buffer);
- if (len != -1) {
- d->devicename.buffer = TALLOC_ARRAY(ctx, uint16, len);
- if (!d->devicename.buffer) {
- return NULL;
- }
- if (unistrcpy(d->devicename.buffer, devmode->devicename.buffer) != len)
- return NULL;
- }
-
-
- len = unistrlen(devmode->formname.buffer);
- if (len != -1) {
- d->formname.buffer = TALLOC_ARRAY(ctx, uint16, len);
- if (!d->formname.buffer) {
- return NULL;
- }
- if (unistrcpy(d->formname.buffer, devmode->formname.buffer) != len)
- return NULL;
- }
-
- if (devmode->driverextra) {
- d->dev_private = (uint8 *)TALLOC_MEMDUP(ctx, devmode->dev_private,
- devmode->driverextra);
- if (!d->dev_private) {
- return NULL;
- }
- } else {
- d->dev_private = NULL;
- }
- return d;
-}
-
-static void copy_devmode_ctr(TALLOC_CTX *ctx, DEVMODE_CTR *new_ctr, DEVMODE_CTR *ctr)
-{
- if (!new_ctr || !ctr)
- return;
-
- DEBUG(8,("copy_devmode_ctr\n"));
-
- new_ctr->size = ctr->size;
- new_ctr->devmode_ptr = ctr->devmode_ptr;
-
- if(ctr->devmode_ptr)
- new_ctr->devmode = dup_devicemode(ctx, ctr->devmode);
-}
-
-static void copy_printer_default(TALLOC_CTX *ctx, PRINTER_DEFAULT *new_def, PRINTER_DEFAULT *def)
-{
- if (!new_def || !def)
- return;
-
- DEBUG(8,("copy_printer_defaults\n"));
-
- new_def->datatype_ptr = def->datatype_ptr;
-
- if (def->datatype_ptr)
- copy_unistr2(&new_def->datatype, &def->datatype);
-
- copy_devmode_ctr(ctx, &new_def->devmode_cont, &def->devmode_cont);
-
- new_def->access_required = def->access_required;
-}
-
-/********************************************************************
* Convert a SPOOL_Q_OPEN_PRINTER structure to a
* SPOOL_Q_OPEN_PRINTER_EX structure
********************************************************************/