s3: Lift the server_messaging_context from notify_printer_byname
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:42:59 +0000 (16:42 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 16:09:36 +0000 (18:09 +0200)
source3/include/proto.h
source3/printing/notify.c
source3/utils/smbcontrol.c

index e4f2b7f125e07536674ee4e4c55a520c4354db12..fb18dff5fddfd3fb2610fa027bf49e9cab46a6a7 100644 (file)
@@ -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  */
 
index 0615bebb8cc6b7e456b99a750d94c8cb43025869..9f07f6cba6d0f45b66f556f34d9bad156cd21da3 100644 (file)
@@ -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 );
 } 
 
index db0b91eb48b009d8316e47a14ae4b321bb0c05f9..7b5f8aaa55dde7e32107e43611fa56015126602d 100644 (file)
@@ -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;