diff options
author | Gerald Carter <jerry@samba.org> | 2003-02-25 20:53:53 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-02-25 20:53:53 +0000 |
commit | 31272d3b6bb9ec62fd666301c7adfa0c1720a99b (patch) | |
tree | c99c3a908739a1dd7bd66ff6b831a3ee1d8715f0 /source/registry/reg_printing.c | |
parent | 9634b1fba059228d436198629a5c7cf01fb6736c (diff) | |
download | samba-31272d3b6bb9ec62fd666301c7adfa0c1720a99b.tar.gz samba-31272d3b6bb9ec62fd666301c7adfa0c1720a99b.tar.xz samba-31272d3b6bb9ec62fd666301c7adfa0c1720a99b.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.
Diffstat (limited to 'source/registry/reg_printing.c')
-rw-r--r-- | source/registry/reg_printing.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/registry/reg_printing.c b/source/registry/reg_printing.c index 4b8eaa658ef..619ffc7ee71 100644 --- a/source/registry/reg_printing.c +++ b/source/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 */ |