From: Volker Lendecke Date: Sun, 8 Aug 2010 14:42:59 +0000 (+0200) Subject: s3: Lift the server_messaging_context from notify_printer_byname X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=128976e01121c877cb815e60504fb6a5391255a2;hp=d62c73b799baf908269835f2d69b1a2094ef23c6;p=abartlet%2Fsamba.git%2F.git s3: Lift the server_messaging_context from notify_printer_byname --- diff --git a/source3/include/proto.h b/source3/include/proto.h index e4f2b7f125e..fb18dff5fdd 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4460,7 +4460,10 @@ void notify_printer_port(struct tevent_context *ev, void notify_printer_location(struct tevent_context *ev, struct messaging_context *msg_ctx, int snum, const char *location); -void notify_printer_byname( const char *printername, uint32 change, const char *value ); +void notify_printer_byname(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *printername, uint32 change, + const char *value); /* The following definitions come from printing/pcap.c */ diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 0615bebb8cc..9f07f6cba6d 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -577,7 +577,10 @@ void notify_printer_location(struct tevent_context *ev, snum, strlen(location) + 1, location); } -void notify_printer_byname( const char *printername, uint32 change, const char *value ) +void notify_printer_byname(struct tevent_context *ev, + struct messaging_context *msg_ctx, + const char *printername, uint32 change, + const char *value) { int snum = print_queue_snum(printername); int type = PRINTER_NOTIFY_TYPE; @@ -586,7 +589,7 @@ void notify_printer_byname( const char *printername, uint32 change, const char * return; send_notify_field_buffer( - server_event_context(), server_messaging_context(), + ev, msg_ctx, printername, type, change, snum, strlen(value)+1, value ); } diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index db0b91eb48b..7b5f8aaa55d 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -695,7 +695,8 @@ static bool do_printnotify(struct messaging_context *msg_ctx, return False; } - notify_printer_byname(argv[2], attribute, + notify_printer_byname(messaging_event_context(msg_ctx), + msg_ctx, argv[2], attribute, CONST_DISCARD(char *, argv[4])); goto send;