summaryrefslogtreecommitdiff
path: root/source3/registry
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/registry
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/registry')
-rw-r--r--source3/registry/reg_printing.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c
index 4b8eaa658e..619ffc7ee7 100644
--- a/source3/registry/reg_printing.c
+++ b/source3/registry/reg_printing.c
@@ -497,7 +497,7 @@ static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys )
keystr = key2;
reg_split_path( keystr, &base, &new_path );
- if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, base) ) )
+ if ( !W_ERROR_IS_OK( get_a_printer(NULL, &printer, 2, base) ) )
goto done;
num_subkeys = get_printer_subkeys( &printer->info_2->data, new_path?new_path:"", &subkey_names );
@@ -557,7 +557,7 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val )
{
/* we are dealing with the printer itself */
- if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, printername) ) )
+ if ( !W_ERROR_IS_OK( get_a_printer(NULL, &printer, 2, printername) ) )
goto done;
info2 = printer->info_2;
@@ -628,7 +628,6 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val )
}
}
-
prs_mem_free( &prs );
num_values = regval_ctr_numvals( val );
@@ -639,7 +638,7 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val )
/* now enumerate the key */
- if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, printername) ) )
+ if ( !W_ERROR_IS_OK( get_a_printer(NULL, &printer, 2, printername) ) )
goto done;
/* iterate over all printer data and fill the regval container */