The Samba-Bugzilla – Attachment 6239 Details for
Bug 7656
Scalability problem with hundreds of printers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed patch
0001-s3-Prune-the-printername-cache-when-a-printer-is-del.patch (text/plain), 2.00 KB, created by
Andreas Schneider
on 2011-02-01 10:13:08 UTC
(
hide
)
Description:
Fixed patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2011-02-01 10:13:08 UTC
Size:
2.00 KB
patch
obsolete
>From 4395aba368e8a563337f0d0c6a806c3d7b1072a3 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Mon, 6 Sep 2010 20:58:45 -0700 >Subject: [PATCH] s3: Prune the printername cache when a printer is deleted > > >Signed-off-by: Andreas Schneider <asn@samba.org> >--- > source3/rpc_server/srv_spoolss_nt.c | 22 ++++++++++++++++++++-- > 1 files changed, 20 insertions(+), 2 deletions(-) > >diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c >index 2a113e4..e3b6d29 100644 >--- a/source3/rpc_server/srv_spoolss_nt.c >+++ b/source3/rpc_server/srv_spoolss_nt.c >@@ -140,6 +140,8 @@ static int nt_printq_status(int v) > return 0; > } > >+static void prune_printername_cache(void); >+ > /*************************************************************************** > Disconnect from the client > ****************************************************************************/ >@@ -355,8 +357,13 @@ static WERROR delete_printer_handle(pipes_struct *p, struct policy_handle *hnd) > return WERR_BADFID; > } > >- return delete_printer_hook(p->mem_ctx, p->server_info->ptok, >- Printer->sharename ); >+ result = delete_printer_hook(p->mem_ctx, p->server_info->ptok, >+ Printer->sharename, p->msg_ctx); >+ if (!W_ERROR_IS_OK(result)) { >+ return result; >+ } >+ prune_printername_cache(); >+ return WERR_OK; > } > > /**************************************************************************** >@@ -414,6 +421,17 @@ static bool set_printer_hnd_printertype(Printer_entry *Printer, const char *hand > return true; > } > >+static void prune_printername_cache_fn(const char *key, const char *value, >+ time_t timeout, void *private_data) >+{ >+ gencache_del(key); >+} >+ >+static void prune_printername_cache(void) >+{ >+ gencache_iterate(prune_printername_cache_fn, NULL, "PRINTERNAME/*"); >+} >+ > /**************************************************************************** > Set printer handle name.. Accept names like \\server, \\server\printer, > \\server\SHARE, & "\\server\,XcvMonitor Standard TCP/IP Port" See >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7656
:
5941
|
5942
|
5949
|
6239
|
6240