From 7c7d796b6d292a7c98b099ad1e1adbc4f2363512 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 25 Feb 2003 20:51:23 +0000 Subject: 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) --- source3/registry/reg_printing.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/registry') diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 4b8eaa658ef..619ffc7ee71 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 */ -- cgit