s3: Lift the server_messaging_context from notify_printer_location
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:41:31 +0000 (16:41 +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/rpc_server/srv_spoolss_nt.c

index 0a797c90f18e3d33ef705ad394e07eb17ce875cb..e4f2b7f125e07536674ee4e4c55a520c4354db12 100644 (file)
@@ -4457,7 +4457,9 @@ void notify_printer_printername(struct tevent_context *ev,
 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_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 );
 
 /* The following definitions come from printing/pcap.c  */
index fae93463df67ad78d69811b239a9bea7c24b64b6..0615bebb8cc6b7e456b99a750d94c8cb43025869 100644 (file)
@@ -565,12 +565,14 @@ void notify_printer_port(struct tevent_context *ev,
                snum, strlen(port_name) + 1, port_name);
 }
 
-void notify_printer_location(int snum, const char *location)
+void notify_printer_location(struct tevent_context *ev,
+                            struct messaging_context *msg_ctx,
+                            int snum, const char *location)
 {
        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_LOCATION,
                snum, strlen(location) + 1, location);
 }
index e950abdbbdf169091b3696d5af73cb65be4567ee..82d1795869c954fa20108e5ee93ac8f8a7b427b4 100644 (file)
@@ -5839,7 +5839,9 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
                                          buffer.length);
 
                if (!force_update) {
-                       notify_printer_location(snum, printer->location);
+                       notify_printer_location(server_event_context(),
+                                               msg_ctx, snum,
+                                               printer->location);
                }
        }
 
@@ -5856,7 +5858,9 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
                                          buffer.length);
 
                if (!force_update) {
-                       notify_printer_location(snum, printer->location);
+                       notify_printer_location(server_event_context(),
+                                               msg_ctx, snum,
+                                               printer->location);
                }
        }