summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-08 22:50:28 +0200
committerVolker Lendecke <vl@samba.org>2010-08-08 23:37:47 +0200
commit795589b4f81b8d40d3cd6a53b85153df01e3ff01 (patch)
tree7a26f0eade86b974f78f952e03592f4e4bad95ae
parent83045b1ba9fb8aa211d94b66453e2a2a61cae7ed (diff)
downloadsamba-795589b4f81b8d40d3cd6a53b85153df01e3ff01.tar.gz
samba-795589b4f81b8d40d3cd6a53b85153df01e3ff01.tar.bz2
samba-795589b4f81b8d40d3cd6a53b85153df01e3ff01.zip
s3: Remove the smbd_messaging_context from cups_cache_reload
-rw-r--r--source3/printing/pcap.c3
-rw-r--r--source3/printing/pcap.h3
-rw-r--r--source3/printing/print_cups.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index f5502be92e..d8b716028e 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -120,7 +120,8 @@ void pcap_cache_reload(void)
#ifdef HAVE_CUPS
if (strequal(pcap_name, "cups")) {
- pcap_reloaded = cups_cache_reload();
+ pcap_reloaded = cups_cache_reload(server_event_context(),
+ server_messaging_context());
goto done;
}
#endif
diff --git a/source3/printing/pcap.h b/source3/printing/pcap.h
index 47abc0fe6e..67f36d6598 100644
--- a/source3/printing/pcap.h
+++ b/source3/printing/pcap.h
@@ -34,7 +34,8 @@ bool aix_cache_reload(void);
/* The following definitions come from printing/print_cups.c */
-bool cups_cache_reload(void);
+bool cups_cache_reload(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
const char *printername,
char **comment,
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 0ce11ae6f8..f96e8e1726 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -558,7 +558,8 @@ static void cups_async_callback(struct event_context *event_ctx,
TALLOC_FREE(cache_fd_event);
}
-bool cups_cache_reload(void)
+bool cups_cache_reload(struct tevent_context *ev,
+ struct messaging_context *msg_ctx)
{
int *p_pipe_fd = TALLOC_P(NULL, int);
@@ -569,9 +570,7 @@ bool cups_cache_reload(void)
*p_pipe_fd = -1;
/* Set up an async refresh. */
- if (!cups_pcap_load_async(server_event_context(),
- server_messaging_context(),
- p_pipe_fd)) {
+ if (!cups_pcap_load_async(ev, msg_ctx, p_pipe_fd)) {
return false;
}
if (!local_pcap_copy) {
@@ -581,8 +580,7 @@ bool cups_cache_reload(void)
DEBUG(10,("cups_cache_reload: sync read on fd %d\n",
*p_pipe_fd ));
- cups_async_callback(server_event_context(),
- NULL,
+ cups_async_callback(ev, NULL,
EVENT_FD_READ,
(void *)p_pipe_fd);
if (!local_pcap_copy) {
@@ -597,7 +595,7 @@ bool cups_cache_reload(void)
*p_pipe_fd ));
/* Trigger an event when the pipe can be read. */
- cache_fd_event = event_add_fd(server_event_context(),
+ cache_fd_event = event_add_fd(ev,
NULL, *p_pipe_fd,
EVENT_FD_READ,
cups_async_callback,