summaryrefslogtreecommitdiff
path: root/source3/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
commit40d16fa275888b0dbb5894d484966c858187997c (patch)
tree81570fd2138c3b1ffc9ff24cd5789858b7ba48ec /source3/rpc_server
parent0000eeb9b859ef3f9dcc6b659d27c897048c63f6 (diff)
downloadsamba-40d16fa275888b0dbb5894d484966c858187997c.tar.gz
samba-40d16fa275888b0dbb5894d484966c858187997c.tar.bz2
samba-40d16fa275888b0dbb5894d484966c858187997c.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. (This used to be commit 92d9f20852d5384e92a93dd0b051034718840ca8)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c8
1 files changed, 7 insertions, 1 deletions
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)));