From 23b3b29eec61860155404333f6e70ebd24b50940 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 25 Feb 2003 20:53:53 +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 31272d3b6bb9ec62fd666301c7adfa0c1720a99b) --- source3/registry/reg_printing.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/registry/reg_printing.c') 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 */ -- cgit