1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

s3: Lift the server_messaging_context from notify_printer_status_byname

This commit is contained in:
Volker Lendecke 2010-08-08 16:16:37 +02:00
parent 30de2f735b
commit 49d18478fd
3 changed files with 17 additions and 9 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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;