diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 4 | ||||
-rw-r--r-- | source3/printing/notify.c | 12 | ||||
-rw-r--r-- | source3/utils/smbcontrol.c | 10 |
3 files changed, 17 insertions, 9 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 1b80461055..7c2740aa4a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4410,7 +4410,9 @@ uint32_t print_parse_jobid(const char *fname); int print_queue_snum(const char *qname); void print_notify_send_messages(struct messaging_context *msg_ctx, unsigned int timeout); -void notify_printer_status_byname(const char *sharename, uint32 status); +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_job_status_byname(const char *sharename, uint32 jobid, uint32 status, uint32 flags); diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 5e5f0294ce..65151e9b05 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -404,15 +404,15 @@ static void send_notify_field_buffer(struct tevent_context *ev, /* Send a message that the printer status has changed */ -void notify_printer_status_byname(const char *sharename, uint32 status) +void notify_printer_status_byname(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *sharename, uint32 status) { /* Printer status stored in value1 */ int snum = print_queue_snum(sharename); - send_notify_field_values(server_event_context(), - server_messaging_context(), - sharename, PRINTER_NOTIFY_TYPE, + send_notify_field_values(ev, msg_ctx, sharename, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_FIELD_STATUS, snum, status, 0, 0); } @@ -422,7 +422,9 @@ void notify_printer_status(int snum, uint32 status) const char *sharename = lp_servicename(snum); if (sharename) - notify_printer_status_byname(sharename, status); + notify_printer_status_byname(server_event_context(), + server_messaging_context(), + sharename, status); } void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status, diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 9fc8012159..098e07616b 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -593,7 +593,9 @@ static bool do_printnotify(struct messaging_context *msg_ctx, return False; } - notify_printer_status_byname(argv[2], PRINTER_STATUS_PAUSED); + notify_printer_status_byname(messaging_event_context(msg_ctx), + msg_ctx, argv[2], + PRINTER_STATUS_PAUSED); goto send; @@ -605,7 +607,9 @@ static bool do_printnotify(struct messaging_context *msg_ctx, return False; } - notify_printer_status_byname(argv[2], PRINTER_STATUS_OK); + notify_printer_status_byname(messaging_event_context(msg_ctx), + msg_ctx, argv[2], + PRINTER_STATUS_OK); goto send; @@ -621,7 +625,7 @@ static bool do_printnotify(struct messaging_context *msg_ctx, jobid = atoi(argv[3]); notify_job_status_byname( - argv[2], jobid, JOB_STATUS_PAUSED, + argv[2], jobid, JOB_STATUS_PAUSED, SPOOLSS_NOTIFY_MSG_UNIX_JOBID); goto send; |