summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-03 16:30:55 +0200
committerGünther Deschner <gd@samba.org>2010-06-03 16:32:49 +0200
commit30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79 (patch)
treea63356c8ccae94fee232e90767dc193802521f62 /source3/rpc_client
parent12d1a3b0a5367b4f920d32e6cb1fcdc2f7d17513 (diff)
downloadsamba-30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79.tar.gz
samba-30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79.tar.bz2
samba-30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79.zip
s3-spoolss: add and use spoolss_printerinfo2_to_setprinterinfo2().
This fixes some invalid typecasts. Guenther
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/init_spoolss.c29
-rw-r--r--source3/rpc_client/init_spoolss.h2
2 files changed, 31 insertions, 0 deletions
diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c
index 1a96e17ed7..736de26947 100644
--- a/source3/rpc_client/init_spoolss.c
+++ b/source3/rpc_client/init_spoolss.c
@@ -90,3 +90,32 @@ WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
}
return WERR_OK;
}
+
+/*******************************************************************
+ ********************************************************************/
+
+void spoolss_printerinfo2_to_setprinterinfo2(const struct spoolss_PrinterInfo2 *i,
+ struct spoolss_SetPrinterInfo2 *s)
+{
+ s->servername = i->servername;
+ s->printername = i->printername;
+ s->sharename = i->sharename;
+ s->portname = i->portname;
+ s->drivername = i->drivername;
+ s->comment = i->comment;
+ s->location = i->location;
+ s->devmode_ptr = 0;
+ s->sepfile = i->sepfile;
+ s->printprocessor = i->printprocessor;
+ s->datatype = i->datatype;
+ s->parameters = i->parameters;
+ s->secdesc_ptr = 0;
+ s->attributes = i->attributes;
+ s->priority = i->priority;
+ s->defaultpriority = i->defaultpriority;
+ s->starttime = i->starttime;
+ s->untiltime = i->untiltime;
+ s->status = i->status;
+ s->cjobs = i->cjobs;
+ s->averageppm = i->averageppm;
+}
diff --git a/source3/rpc_client/init_spoolss.h b/source3/rpc_client/init_spoolss.h
index 50ccf477ab..60ee041ae5 100644
--- a/source3/rpc_client/init_spoolss.h
+++ b/source3/rpc_client/init_spoolss.h
@@ -11,4 +11,6 @@ WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
enum winreg_Type type,
union spoolss_PrinterData *data);
+void spoolss_printerinfo2_to_setprinterinfo2(const struct spoolss_PrinterInfo2 *i,
+ struct spoolss_SetPrinterInfo2 *s);