diff options
Diffstat (limited to 'source3/smbd/close.c')
-rw-r--r-- | source3/smbd/close.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 4358f8fc2f..c4d323b1ba 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -100,6 +100,12 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) close_filestruct(fsp); + if (normal_close && fsp->print_file) { + print_fsp_end(fsp); + file_free(fsp); + return 0; + } + if (lp_share_modes(SNUM(conn))) { lock_share_entry_fsp(fsp); del_share_mode(fsp); @@ -115,10 +121,6 @@ static int close_normal_file(files_struct *fsp, BOOL normal_close) err = fd_close(conn, fsp); - /* NT uses smbclose to start a print - weird */ - if (normal_close && fsp->print_file) - print_file(conn, fsp); - /* check for magic scripts */ if (normal_close) { check_magic(fsp,conn); |