summaryrefslogtreecommitdiff
path: root/source3/printing/printfsp.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-10 18:11:32 -0700
committerTim Prouty <tprouty@samba.org>2009-07-20 17:26:57 -0700
commitc9b8a017147211d86662f40dcf835b152ab90cf4 (patch)
tree8b234318da33165a45422b4a09cb5fd3dacd2507 /source3/printing/printfsp.c
parent5a8d70d465f28ae02f4df7a3c2905e028c2e3142 (diff)
downloadsamba-c9b8a017147211d86662f40dcf835b152ab90cf4.tar.gz
samba-c9b8a017147211d86662f40dcf835b152ab90cf4.tar.bz2
samba-c9b8a017147211d86662f40dcf835b152ab90cf4.zip
s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules.
Diffstat (limited to 'source3/printing/printfsp.c')
-rw-r--r--source3/printing/printfsp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index a8e175a684..9185fc84b1 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -58,6 +58,13 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
return NT_STATUS_ACCESS_DENIED; /* No errno around here */
}
+ status = create_synthetic_smb_fname(fsp,
+ print_job_fname(lp_const_servicename(SNUM(conn)), jobid), NULL,
+ NULL, &fsp->fsp_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ pjob_delete(lp_const_servicename(SNUM(conn)), jobid);
+ return status;
+ }
/* setup a full fsp */
fsp->fh->fd = print_job_fd(lp_const_servicename(SNUM(conn)),jobid);
GetTimeOfDay(&fsp->open_time);
@@ -72,7 +79,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
fsp->oplock_type = NO_OPLOCK;
fsp->sent_oplock_break = NO_BREAK_SENT;
fsp->is_directory = False;
- string_set(&fsp->fsp_name,print_job_fname(lp_const_servicename(SNUM(conn)),jobid));
fsp->wcp = NULL;
SMB_VFS_FSTAT(fsp, psbuf);
fsp->mode = psbuf->st_ex_mode;
@@ -98,7 +104,7 @@ void print_fsp_end(files_struct *fsp, enum file_close_type close_type)
}
if (fsp->fsp_name) {
- string_free(&fsp->fsp_name);
+ TALLOC_FREE(fsp->fsp_name);
}
if (!rap_to_pjobid(fsp->rap_print_jobid, NULL, &jobid)) {