summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-07-01 09:34:37 +0000
committerJean-François Micouleau <jfm@samba.org>2000-07-01 09:34:37 +0000
commit104217f3b05aa206b37ab6af0899dbe71d142d2e (patch)
tree0be1509ea3d32fe76c9cc4c6cf5d188d88677801 /source3/printing
parent55f9dc2027a1d5419ae06f079723458c84721fd1 (diff)
downloadsamba-104217f3b05aa206b37ab6af0899dbe71d142d2e.tar.gz
samba-104217f3b05aa206b37ab6af0899dbe71d142d2e.tar.bz2
samba-104217f3b05aa206b37ab6af0899dbe71d142d2e.zip
Found that the minimum priority is 1 and not 0 on NT.
Changed back the devicemode's devicename to "\\server\printer". I'm 100% sure it is correct, it's what NT sends on the wire. And that's the printer's name and NOT the port's name as it has to be unique. It must also be a UNC because it's a remote printer (remote for the client). J.F. (This used to be commit a7098c47b6ecbd7bb5df1330ea176aa4d463aad3)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index d599d167ec..83cd03d6d6 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -23,6 +23,7 @@
#include "includes.h"
extern int DEBUGLEVEL;
+extern pstring global_myname;
static TDB_CONTEXT *tdb; /* used for driver files */
@@ -793,6 +794,7 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename)
nt_devmode->devicename
*/
+ char adevice[32];
NT_DEVICEMODE *nt_devmode = (NT_DEVICEMODE *)malloc(sizeof(NT_DEVICEMODE));
if (nt_devmode == NULL) {
@@ -802,7 +804,10 @@ NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename)
ZERO_STRUCTP(nt_devmode);
- fstrcpy(nt_devmode->devicename, default_devicename);
+ snprintf(adevice, sizeof(adevice), "\\\\%s\\%s", global_myname, default_devicename);
+ fstrcpy(nt_devmode->devicename, adevice);
+
+
fstrcpy(nt_devmode->formname, "Letter");
nt_devmode->specversion = 0x0401;
@@ -1039,6 +1044,8 @@ static uint32 get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstrin
info.starttime = 0; /* Minutes since 12:00am GMT */
info.untiltime = 0; /* Minutes since 12:00am GMT */
+ info.priority = 1;
+ info.default_priority = 1;
if ((info.devmode = construct_nt_devicemode(info.printername)) == NULL)
goto fail;