s3: Lift the server_messaging_context from notify_printer_driver
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:34:44 +0000 (16:34 +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/rpc_server/srv_spoolss_nt.c

index 2efde2e82d56fc09b46e2fe9a8ad0f4cdecda3c2..a484530a59df0b428231abfb1daf05f9347be53a 100644 (file)
@@ -4442,7 +4442,9 @@ void notify_job_submitted(struct tevent_context *ev,
                          struct messaging_context *msg_ctx,
                          const char *sharename, uint32 jobid,
                          time_t submitted);
-void notify_printer_driver(int snum, const char *driver_name);
+void notify_printer_driver(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, const char *driver_name);
 void notify_printer_comment(int snum, const char *comment);
 void notify_printer_sharename(int snum, const char *share_name);
 void notify_printer_printername(int snum, const char *printername);
index 5cac9d40d368f8a7ecbdef52095abf871baefc31..8de79c4c604e817ceef1fa8dc70cb47b256489b1 100644 (file)
@@ -505,12 +505,14 @@ void notify_job_submitted(struct tevent_context *ev,
                jobid, sizeof(submitted), (char *)&submitted);
 }
 
-void notify_printer_driver(int snum, const char *driver_name)
+void notify_printer_driver(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, const char *driver_name)
 {
        const char *sharename = lp_servicename(snum);
 
        send_notify_field_buffer(
-               server_event_context(), server_messaging_context(),
+               ev, msg_ctx,
                sharename, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_FIELD_DRIVER_NAME,
                snum, strlen(driver_name) + 1, driver_name);
 }
index 55f2001b5bce773fe3d8fe1e344bfbda7523dc89..fbe769b396988b284f4600085a3c58b1ebd94c70 100644 (file)
@@ -5739,7 +5739,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
                        DEBUG(10,("update_printer: changing driver [%s]!  Sending event!\n",
                                printer->drivername));
 
-                       notify_printer_driver(snum, printer->drivername);
+                       notify_printer_driver(server_event_context(), msg_ctx,
+                                             snum, printer->drivername);
                }
        }