s3-spoolss: dont overwrite location change notify.
authorGünther Deschner <gd@samba.org>
Fri, 1 Oct 2010 04:05:38 +0000 (06:05 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 1 Oct 2010 06:33:46 +0000 (08:33 +0200)
Guenther

source3/include/proto.h
source3/printing/notify.c
source3/rpc_server/srv_spoolss_nt.c

index 5cdb956974c3c535c814069b4d767c634fea0b4d..866836f99fdca6dbf589942ef815150fa47e3733 100644 (file)
@@ -4044,6 +4044,9 @@ void notify_printer_byname(struct tevent_context *ev,
                           struct messaging_context *msg_ctx,
                           const char *printername, uint32 change,
                           const char *value);
+void notify_printer_sepfile(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           int snum, const char *sepfile);
 
 /* The following definitions come from printing/pcap.c  */
 
index 9f07f6cba6d0f45b66f556f34d9bad156cd21da3..84a979e1b276cba161fc48236446f4f1e6326506 100644 (file)
@@ -577,6 +577,19 @@ void notify_printer_location(struct tevent_context *ev,
                snum, strlen(location) + 1, location);
 }
 
+void notify_printer_sepfile(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           int snum, const char *sepfile)
+{
+       const char *sharename = lp_servicename(snum);
+
+       send_notify_field_buffer(
+               ev, msg_ctx,
+               sharename, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_FIELD_SEPFILE,
+               snum, strlen(sepfile) + 1, sepfile);
+}
+
+
 void notify_printer_byname(struct tevent_context *ev,
                           struct messaging_context *msg_ctx,
                           const char *printername, uint32 change,
index 889c370c39065d1ceaeba1942c903cb106b18f4c..5f803b6304427684835154366381c4b4c743b84b 100644 (file)
@@ -6245,9 +6245,9 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
                                          buffer.length);
 
                if (!force_update) {
-                       notify_printer_location(server_event_context(),
-                                               msg_ctx, snum,
-                                               printer->location);
+                       notify_printer_sepfile(server_event_context(),
+                                              msg_ctx, snum,
+                                              printer->sepfile);
                }
        }