summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-23 11:43:32 +0100
committerGünther Deschner <gd@samba.org>2009-02-24 01:08:03 +0100
commitbcd6e5ec3315b14cedf7437a70c34d233ded082e (patch)
tree0fee7f0a51a12c05c7d1210b9187d7009b37e973 /source3/printing
parent3e796103b28f1279bdaa481b7d5c4447d62683bb (diff)
downloadsamba-bcd6e5ec3315b14cedf7437a70c34d233ded082e.tar.gz
samba-bcd6e5ec3315b14cedf7437a70c34d233ded082e.tar.bz2
samba-bcd6e5ec3315b14cedf7437a70c34d233ded082e.zip
s3-spoolss: fix notify_printer_status_byname.
This took me almost a week to find, so here a little longer explanation: When a windows client registers printer *status* change notifies using spoolss_RemoteFindFirstChangeNotify, it registers them to a print server handle, not a printer handle. We were then correctly monitoring the printer status changes but were sending out the spoolss_RouterReplyPrinterEx via the back-channel connection with job_id set to 0 (which we only may do for monitored printer change status notifies on printer handlers, not print server handles). Windows was then showing a new empty dummy printer icon in the explorer as it cannot route the notify event to the approriate local handle. It also discarded the content of the notify event message of course. With this, printer change notify for pausing, resuming and purging printers nicely works again here. Jerry, Tim and all other printing gurus, please check. Guenther
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/notify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index d478b86f91..e19212eea8 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -397,8 +397,10 @@ void notify_printer_status_byname(const char *sharename, uint32 status)
{
/* Printer status stored in value1 */
+ int snum = print_queue_snum(sharename);
+
send_notify_field_values(sharename, PRINTER_NOTIFY_TYPE,
- PRINTER_NOTIFY_STATUS, 0,
+ PRINTER_NOTIFY_STATUS, snum,
status, 0, 0);
}