summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-01-25 20:16:14 +0000
committerJeremy Allison <jra@samba.org>2002-01-25 20:16:14 +0000
commit248770d73072e36fd9812ec5986dce5380dfab33 (patch)
treefc8604b377855cb4db38f2c21c88680c78e3ddd1 /source
parent5f4de275a3a63a95e76d077ffc94321a078833bf (diff)
downloadsamba-248770d73072e36fd9812ec5986dce5380dfab33.tar.gz
Fixed display of "remote downlevel document" in old print job submission
case. Jeremy.
Diffstat (limited to 'source')
-rw-r--r--source/printing/printfsp.c14
-rw-r--r--source/smbd/open.c2
-rw-r--r--source/smbd/reply.c2
3 files changed, 14 insertions, 4 deletions
diff --git a/source/printing/printfsp.c b/source/printing/printfsp.c
index 322deadf0fa..ea50f43d2e2 100644
--- a/source/printing/printfsp.c
+++ b/source/printing/printfsp.c
@@ -27,17 +27,27 @@ open a print file and setup a fsp for it. This is a wrapper around
print_job_start().
***************************************************************************/
-files_struct *print_fsp_open(connection_struct *conn)
+files_struct *print_fsp_open(connection_struct *conn, char *fname)
{
int jobid;
SMB_STRUCT_STAT sbuf;
extern struct current_user current_user;
files_struct *fsp = file_new(conn);
+ fstring name;
if(!fsp)
return NULL;
- jobid = print_job_start(&current_user, SNUM(conn), "smb.prn");
+ fstrcpy( name, "Remote Downlevel Document");
+ if (fname) {
+ char *p = strrchr(fname, '/');
+ fstrcat(name, " ");
+ if (!p)
+ p = fname;
+ fstrcat(name, p);
+ }
+
+ jobid = print_job_start(&current_user, SNUM(conn), name);
if (jobid == -1) {
file_free(fsp);
return NULL;
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 589f1a32b43..6a6e22353bc 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -632,7 +632,7 @@ files_struct *open_file_shared(connection_struct *conn,char *fname, SMB_STRUCT_S
ignored */
*Access = DOS_OPEN_WRONLY;
*action = FILE_WAS_CREATED;
- return print_fsp_open(conn);
+ return print_fsp_open(conn, fname);
}
fsp = file_new(conn);
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 03d0c189424..3233168ffcd 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -2504,7 +2504,7 @@ int reply_printopen(connection_struct *conn,
}
/* Open for exclusive use, write only. */
- fsp = print_fsp_open(conn);
+ fsp = print_fsp_open(conn, NULL);
if (!fsp) {
END_PROFILE(SMBsplopen);