From 83c4c04121addc39ae7b13001545ed303b8adf1c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 16:40:08 +0200 Subject: s3: Lift the server_messaging_context from notify_printer_port --- source3/include/proto.h | 4 +++- source3/printing/notify.c | 6 ++++-- source3/rpc_server/srv_spoolss_nt.c | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 0b577762b0..0a797c90f1 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4454,7 +4454,9 @@ void notify_printer_sharename(struct tevent_context *ev, void notify_printer_printername(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *printername); -void notify_printer_port(int snum, const char *port_name); +void notify_printer_port(struct tevent_context *ev, + struct messaging_context *msg_ctx, + int snum, const char *port_name); void notify_printer_location(int snum, const char *location); void notify_printer_byname( const char *printername, uint32 change, const char *value ); diff --git a/source3/printing/notify.c b/source3/printing/notify.c index b137331137..fae93463df 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -553,12 +553,14 @@ void notify_printer_printername(struct tevent_context *ev, snum, strlen(printername) + 1, printername); } -void notify_printer_port(int snum, const char *port_name) +void notify_printer_port(struct tevent_context *ev, + struct messaging_context *msg_ctx, + int snum, const char *port_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_PORT_NAME, snum, strlen(port_name) + 1, port_name); } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 1c0a69d3fb..e950abdbbd 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -5821,7 +5821,8 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx, buffer.length); if (!force_update) { - notify_printer_port(snum, printer->portname); + notify_printer_port(server_event_context(), + msg_ctx, snum, printer->portname); } } -- cgit