From 30a9ddccff5b1bd1694a1a9f0e5ceebdee316d79 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 3 Jun 2010 16:30:55 +0200 Subject: s3-spoolss: add and use spoolss_printerinfo2_to_setprinterinfo2(). This fixes some invalid typecasts. Guenther --- source3/rpc_client/init_spoolss.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source3/rpc_client/init_spoolss.c') 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; +} -- cgit