summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-04-22 16:53:15 -0400
committerSimo Sorce <idra@samba.org>2010-07-27 10:27:06 -0400
commit5604a78f0919f77fdf041989e3e2e0f61da80fd9 (patch)
tree93004948e32e70069cc2563436edc7c858b14da9 /source3/printing/printing.c
parent104c419345a42a9a02ae25df482f449dc41a6380 (diff)
downloadsamba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.tar.gz
samba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.tar.bz2
samba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.zip
s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 1b5decc696..e0cca8854e 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -307,8 +307,10 @@ int unpack_pjob( uint8 *buf, int buflen, struct printjob *pjob )
if ( len == -1 )
return -1;
- if ( (used = unpack_devicemode(&pjob->nt_devmode, buf+len, buflen-len)) == -1 )
+ used = unpack_devicemode(NULL, buf+len, buflen-len, &pjob->devmode);
+ if (used == -1) {
return -1;
+ }
len += used;
@@ -352,9 +354,7 @@ static struct printjob *print_job_find(const char *sharename, uint32 jobid)
return NULL;
}
- if ( pjob.nt_devmode ) {
- free_nt_devicemode( &pjob.nt_devmode );
- }
+ talloc_free(pjob.devmode);
ZERO_STRUCT( pjob );
@@ -556,7 +556,7 @@ static bool pjob_store(const char* sharename, uint32 jobid, struct printjob *pjo
pjob->user,
pjob->queuename);
- len += pack_devicemode(pjob->nt_devmode, buf+len, buflen-len);
+ len += pack_devicemode(pjob->devmode, buf+len, buflen-len);
if (buflen != len) {
buf = (uint8 *)SMB_REALLOC(buf, len);
@@ -588,7 +588,7 @@ static bool pjob_store(const char* sharename, uint32 jobid, struct printjob *pjo
if ( unpack_pjob( old_data.dptr, old_data.dsize, &old_pjob ) != -1 )
{
pjob_store_notify( sharename, jobid, &old_pjob , pjob );
- free_nt_devicemode( &old_pjob.nt_devmode );
+ talloc_free(old_pjob.devmode);
}
}
else {
@@ -709,7 +709,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void
jobid = IVAL(key.dptr, 0);
if ( unpack_pjob( data.dptr, data.dsize, &pjob ) == -1 )
return 0;
- free_nt_devicemode( &pjob.nt_devmode );
+ talloc_free(pjob.devmode);
if (!pjob.smbjob) {
@@ -1850,14 +1850,14 @@ char *print_job_fname(const char* sharename, uint32 jobid)
has not been spooled.
****************************************************************************/
-NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid)
+struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid)
{
struct printjob *pjob = print_job_find(sharename, jobid);
if ( !pjob )
return NULL;
- return pjob->nt_devmode;
+ return pjob->devmode;
}
/****************************************************************************
@@ -2410,7 +2410,7 @@ static bool add_to_jobs_changed(struct tdb_print_db *pdb, uint32 jobid)
***************************************************************************/
uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
- const char *jobname, NT_DEVICEMODE *nt_devmode )
+ const char *jobname, struct spoolss_DeviceMode *devmode )
{
uint32 jobid;
char *path;
@@ -2485,7 +2485,7 @@ uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
pjob.size = 0;
pjob.spooled = False;
pjob.smbjob = True;
- pjob.nt_devmode = nt_devmode;
+ pjob.devmode = devmode;
fstrcpy(pjob.jobname, jobname);