From 0bc56a2e5ffd0e65e4770e10c80d9fec02950b36 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 5 Jul 2007 16:26:27 +0000 Subject: r23724: Reduce access to the global inbuf a tiny bit. Add a struct smb_request that contains some of the fields from the SMB header, removing the need to access inbuf directly. This right now is used only in the open file code & friends, and creating that header is only done when needed. This needs more work, but it is a start. Jeremy, I'm only checking this into 3_0, please review before I merge it to _26. Volker (This used to be commit ca988f4e79e977160d82e86486972afd15d4acf5) --- source3/printing/nt_printing.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/printing/nt_printing.c') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 84dba9d55a..c0a9407d6a 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1291,7 +1291,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr driver_unix_convert(filepath,conn,NULL,&stat_buf); - status = open_file_ntcreate(conn, filepath, &stat_buf, + status = open_file_ntcreate(conn, NULL, filepath, &stat_buf, FILE_GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, @@ -1327,7 +1327,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, fstr pstrcpy(filepath, new_file); driver_unix_convert(filepath,conn,NULL,&stat_buf); - status = open_file_ntcreate(conn, filepath, &stat_buf, + status = open_file_ntcreate(conn, NULL, filepath, &stat_buf, FILE_GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, @@ -1460,7 +1460,7 @@ static uint32 get_correct_cversion(const char *architecture, fstring driverpath_ goto error_exit; } - status = open_file_ntcreate(conn, driverpath, &st, + status = open_file_ntcreate(conn, NULL, driverpath, &st, FILE_GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, @@ -4941,7 +4941,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct pstrcpy( file, s ); driver_unix_convert(file, conn, NULL, &st); DEBUG(10,("deleting driverfile [%s]\n", s)); - unlink_internals(conn, 0, file, False, False); + unlink_internals(conn, NULL, 0, file, False); } } @@ -4950,7 +4950,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct pstrcpy( file, s ); driver_unix_convert(file, conn, NULL, &st); DEBUG(10,("deleting configfile [%s]\n", s)); - unlink_internals(conn, 0, file, False, False); + unlink_internals(conn, NULL, 0, file, False); } } @@ -4959,7 +4959,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct pstrcpy( file, s ); driver_unix_convert(file, conn, NULL, &st); DEBUG(10,("deleting datafile [%s]\n", s)); - unlink_internals(conn, 0, file, False, False); + unlink_internals(conn, NULL, 0, file, False); } } @@ -4968,7 +4968,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct pstrcpy( file, s ); driver_unix_convert(file, conn, NULL, &st); DEBUG(10,("deleting helpfile [%s]\n", s)); - unlink_internals(conn, 0, file, False, False); + unlink_internals(conn, NULL, 0, file, False); } } @@ -4984,7 +4984,7 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct pstrcpy( file, p ); driver_unix_convert(file, conn, NULL, &st); DEBUG(10,("deleting dependent file [%s]\n", file)); - unlink_internals(conn, 0, file, False, False); + unlink_internals(conn, NULL, 0, file, False); } i++; -- cgit