summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-25 20:53:53 +0000
committerGerald Carter <jerry@samba.org>2003-02-25 20:53:53 +0000
commit23b3b29eec61860155404333f6e70ebd24b50940 (patch)
treebe9a2981266cc1cce4e9144bb5a77ed0f364a830 /source3/registry
parentb8fbb3189a8b55ddc87f9b52b1c00d1acbb37e72 (diff)
downloadsamba-23b3b29eec61860155404333f6e70ebd24b50940.tar.gz
samba-23b3b29eec61860155404333f6e70ebd24b50940.tar.bz2
samba-23b3b29eec61860155404333f6e70ebd24b50940.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 31272d3b6bb9ec62fd666301c7adfa0c1720a99b)
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 */