From 40d16fa275888b0dbb5894d484966c858187997c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Apr 2008 11:14:09 -0700 Subject: Fix bug #5372. With a large CUPS installation with a remote server, contacting the server when searching for a name for the location and comment fields can take so much time the client times out. When searching for a name we don't use these fields anyway, so add a function get_a_printer_search() which doesn't contact the CUPS server. Jeremy. (This used to be commit 92d9f20852d5384e92a93dd0b051034718840ca8) --- source3/rpc_server/srv_spoolss_nt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 403beb6782..7788e763fa 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -521,7 +521,13 @@ static bool set_printer_hnd_name(Printer_entry *Printer, char *handlename) fstrcpy(sname, lp_servicename(snum)); printer = NULL; - result = get_a_printer( NULL, &printer, 2, sname ); + + /* This call doesn't fill in the location or comment from + * a CUPS server for efficiency with large numbers of printers. + * JRA. + */ + + result = get_a_printer_search( NULL, &printer, 2, sname ); if ( !W_ERROR_IS_OK(result) ) { DEBUG(0,("set_printer_hnd_name: failed to lookup printer [%s] -- result [%s]\n", sname, dos_errstr(result))); -- cgit