summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-19 09:09:40 +0100
committerGünther Deschner <gd@samba.org>2010-02-23 16:41:26 +0100
commita2cd2039824181494eb1496068d2121ee6150839 (patch)
tree3dd2ead118c4aafefff838bd32334d3d79f70d52 /source3
parent1e9df26ef970df41de54142a78606a15374acbac (diff)
downloadsamba-a2cd2039824181494eb1496068d2121ee6150839.tar.gz
samba-a2cd2039824181494eb1496068d2121ee6150839.tar.bz2
samba-a2cd2039824181494eb1496068d2121ee6150839.zip
s3:spoolss: construct the devmode the same way for level 2 and 8
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index c555a31465..a5484f8974 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3949,25 +3949,11 @@ static WERROR construct_printer_info8(TALLOC_CTX *mem_ctx,
struct spoolss_DeviceModeInfo *r,
int snum)
{
- struct spoolss_DeviceMode *devmode;
- WERROR result;
-
- if (!ntprinter->info_2->devmode) {
- r->devmode = NULL;
- return WERR_OK;
- }
-
- devmode = TALLOC_ZERO_P(mem_ctx, struct spoolss_DeviceMode);
- W_ERROR_HAVE_NO_MEMORY(devmode);
-
- result = convert_nt_devicemode(mem_ctx, devmode, ntprinter->info_2->devmode);
- if (!W_ERROR_IS_OK(result)) {
- TALLOC_FREE(devmode);
- return result;
+ r->devmode = construct_dev_mode(mem_ctx, lp_const_servicename(snum));
+ if (!r->devmode) {
+ DEBUG(8,("Returning NULL Devicemode!\n"));
}
- r->devmode = devmode;
-
return WERR_OK;
}