summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-10-10 11:55:14 -0700
committerJeremy Allison <jra@samba.org>2008-10-10 11:55:14 -0700
commiteada8f8abe6e4b770b7a2e279fc897a4272b6fa5 (patch)
tree2cb91cd91cb12005b25b531e9ed821f153f2a916 /source3/include
parent5b75aa34069d488d23e880393d4280cbe85cc5c6 (diff)
downloadsamba-eada8f8abe6e4b770b7a2e279fc897a4272b6fa5.tar.gz
samba-eada8f8abe6e4b770b7a2e279fc897a4272b6fa5.tar.bz2
samba-eada8f8abe6e4b770b7a2e279fc897a4272b6fa5.zip
If you have a large number of cups printers, then scanning for print info can cause a client to timeout
(it takes longer than 30 seconds to enumerate them). Make scanning for printers async with a callback from the main loop. This fixes a bug that was irritating *me* :-). Jeremy.
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h8
-rw-r--r--source3/include/smb.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b7a7ed5479..fc497b6966 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5995,7 +5995,7 @@ bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
struct parm_struct *lp_get_parameter(const char *param_name);
struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
bool lp_snum_ok(int iService);
-void lp_add_one_printer(char *name, char *comment);
+void lp_add_one_printer(const char *name, const char *comment, void *pdata);
bool lp_loaded(void);
void lp_killunused(bool (*snumused) (int));
void lp_kill_all_services(void);
@@ -6568,11 +6568,15 @@ char* get_server_name( Printer_entry *printer );
/* The following definitions come from printing/pcap.c */
+bool pcap_cache_add_specific(struct pcap_cache **ppcache, const char *name, const char *comment);
+void pcap_cache_destroy_specific(struct pcap_cache **ppcache);
bool pcap_cache_add(const char *name, const char *comment);
bool pcap_cache_loaded(void);
+void pcap_cache_replace(const struct pcap_cache *cache);
void pcap_cache_reload(void);
bool pcap_printername_ok(const char *printername);
-void pcap_printer_fn(void (*fn)(char *, char *));
+void pcap_printer_fn_specific(const struct pcap_cache *, void (*fn)(const char *, const char *, void *), void *);
+void pcap_printer_fn(void (*fn)(const char *, const char *, void *), void *);
/* The following definitions come from printing/print_aix.c */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index c8c4f8c3cc..ef98b5e1b5 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -391,6 +391,7 @@ struct idle_event;
struct share_mode_entry;
struct uuid;
struct named_mutex;
+struct pcap_cache;
struct vfs_fsp_data {
struct vfs_fsp_data *next;