s3: Remove the smbd_messaging_context from cups_cache_reload
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 20:50:28 +0000 (22:50 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 21:37:47 +0000 (23:37 +0200)
source3/printing/pcap.c
source3/printing/pcap.h
source3/printing/print_cups.c

index f5502be92ef4afcd3946ff9618c1c20e5044eb3d..d8b716028e0d4ec265bb0a3f645c8938f6923594 100644 (file)
@@ -120,7 +120,8 @@ void pcap_cache_reload(void)
 
 #ifdef HAVE_CUPS
        if (strequal(pcap_name, "cups")) {
 
 #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
                goto done;
        }
 #endif
index 47abc0fe6effbcae8573a81efe6c8f3a45e0ebb9..67f36d6598128245a12e9baa3851c25b3dfa01b7 100644 (file)
@@ -34,7 +34,8 @@ bool aix_cache_reload(void);
 
 /* The following definitions come from printing/print_cups.c  */
 
 
 /* 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,
 bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
                                const char *printername,
                                char **comment,
index 0ce11ae6f89169dd20c9c1421288b0450e9aafe3..f96e8e17268c000dac4aee5e03fe43b721eea7c9 100644 (file)
@@ -558,7 +558,8 @@ static void cups_async_callback(struct event_context *event_ctx,
        TALLOC_FREE(cache_fd_event);
 }
 
        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);
 
 {
        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. */
        *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) {
                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 ));
 
                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) {
                                        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. */
                        *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,
                                        NULL, *p_pipe_fd,
                                        EVENT_FD_READ,
                                        cups_async_callback,