summaryrefslogtreecommitdiffstats
path: root/source/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-04-04 11:14:09 -0700
committerJeremy Allison <jra@samba.org>2008-04-04 11:14:09 -0700
commit92d9f20852d5384e92a93dd0b051034718840ca8 (patch)
tree3165134e1c940b1dcb2d162d9cf318c4f932af0a /source/rpc_server
parent0dc9840cefb08b2732d294eb45508ce687ded324 (diff)
downloadsamba-92d9f20852d5384e92a93dd0b051034718840ca8.tar.gz
samba-92d9f20852d5384e92a93dd0b051034718840ca8.tar.xz
samba-92d9f20852d5384e92a93dd0b051034718840ca8.zip
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.
Diffstat (limited to 'source/rpc_server')
-rw-r--r--source/rpc_server/srv_spoolss_nt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c
index 403beb6782b..7788e763fa5 100644
--- a/source/rpc_server/srv_spoolss_nt.c
+++ b/source/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)));