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);
/* 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);
}
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,
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;
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;
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;