From 54de56a1be8ede7476c741cd1631ad1ac8107fcc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 16 Apr 2000 06:22:31 +0000 Subject: the changes to the main smb code ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places. (This used to be commit d870542c2884510bd45fd5b54ff2157434d53f4c) --- source3/smbd/close.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/smbd/close.c') 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); -- cgit