s3: Lift the server_messaging_context from notify_printer_status
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:19:03 +0000 (16:19 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 16:09:35 +0000 (18:09 +0200)
source3/include/proto.h
source3/printing/notify.c
source3/printing/printing.c

index 7c2740aa4a84c2bfa79936b20daa430cbe67f932..2b26b10deb72a0e76175f96da281475089e4714a 100644 (file)
@@ -4413,7 +4413,9 @@ void print_notify_send_messages(struct messaging_context *msg_ctx,
 void notify_printer_status_byname(struct tevent_context *ev,
                                  struct messaging_context *msg_ctx,
                                  const char *sharename, uint32 status);
-void notify_printer_status(int snum, uint32 status);
+void notify_printer_status(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, uint32 status);
 void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
                              uint32 flags);
 void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
index 65151e9b05c20e690b0449942c7464b76b851ba6..de6515aa5c7195b4808b9b940c5ce9a33d6868a7 100644 (file)
@@ -417,14 +417,14 @@ void notify_printer_status_byname(struct tevent_context *ev,
                                 status, 0, 0);
 }
 
-void notify_printer_status(int snum, uint32 status)
+void notify_printer_status(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, uint32 status)
 {
        const char *sharename = lp_servicename(snum);
 
        if (sharename)
-               notify_printer_status_byname(server_event_context(),
-                                            server_messaging_context(),
-                                            sharename, status);
+               notify_printer_status_byname(ev, msg_ctx, sharename, status);
 }
 
 void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
index 8a1281438609bb81cb2f84ef3325ce8b3430a4ef..5d8348e70541c8d295136c648d7612b7080c2438 100644 (file)
@@ -3063,7 +3063,8 @@ WERROR print_queue_pause(struct auth_serversupplied_info *server_info,
 
        /* Send a printer notify message */
 
-       notify_printer_status(snum, PRINTER_STATUS_PAUSED);
+       notify_printer_status(server_event_context(), msg_ctx, snum,
+                             PRINTER_STATUS_PAUSED);
 
        return WERR_OK;
 }
@@ -3099,7 +3100,8 @@ WERROR print_queue_resume(struct auth_serversupplied_info *server_info,
 
        /* Send a printer notify message */
 
-       notify_printer_status(snum, PRINTER_STATUS_OK);
+       notify_printer_status(server_event_context(), msg_ctx, snum,
+                             PRINTER_STATUS_OK);
 
        return WERR_OK;
 }