summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-25 20:51:23 +0000
committerGerald Carter <jerry@samba.org>2003-02-25 20:51:23 +0000
commit7c7d796b6d292a7c98b099ad1e1adbc4f2363512 (patch)
treecbd12e1a85aa8f470a598e87be47c7be097895fe /source3/smbd
parent3a2f56cb630a7566ef0a70052b3102651bf653cc (diff)
downloadsamba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.tar.gz
samba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.tar.bz2
samba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.zip
Progress on CR 601
cache the printer_info_2 with the open printer handle. cache is invalidated on a mod_a_printer() call **on that smbd**. Yes, this means that the window for admins to step on each other from different clients just got larger, but since handles a generally short lived this is probably ok. (This used to be commit 33c7b7522504fb15989f32add8e9a087c8d9d0fa)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 25f390be55..98857c6d32 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -500,7 +500,7 @@ static BOOL get_driver_name(int snum, pstring drivername)
NT_PRINTER_INFO_LEVEL *info = NULL;
BOOL in_tdb = False;
- get_a_printer (&info, 2, lp_servicename(snum));
+ get_a_printer (NULL, &info, 2, lp_servicename(snum));
if (info != NULL) {
pstrcpy( drivername, info->info_2->drivername);
in_tdb = True;
@@ -522,7 +522,7 @@ static void fill_printq_info_52(connection_struct *conn, int snum,
NT_PRINTER_DRIVER_INFO_LEVEL driver;
NT_PRINTER_INFO_LEVEL *printer = NULL;
- if ( !W_ERROR_IS_OK(get_a_printer( &printer, 2, lp_servicename(snum))) ) {
+ if ( !W_ERROR_IS_OK(get_a_printer( NULL, &printer, 2, lp_servicename(snum))) ) {
DEBUG(3,("fill_printq_info_52: Failed to lookup printer [%s]\n",
lp_servicename(snum)));
goto err;
@@ -679,7 +679,7 @@ static int get_printerdrivernumber(int snum)
NT_PRINTER_DRIVER_INFO_LEVEL driver;
NT_PRINTER_INFO_LEVEL *printer = NULL;
- if ( !W_ERROR_IS_OK(get_a_printer( &printer, 2, lp_servicename(snum))) ) {
+ if ( !W_ERROR_IS_OK(get_a_printer( NULL, &printer, 2, lp_servicename(snum))) ) {
DEBUG(3,("get_printerdrivernumber: Failed to lookup printer [%s]\n",
lp_servicename(snum)));
goto done;