summaryrefslogtreecommitdiff
path: root/source3/printing/notify.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-30 17:13:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:48 -0500
commit54abd2aa66069e6baf7769c496f46d9dba18db39 (patch)
tree9cf8e88168011797319ba9e9866749201b1eac1e /source3/printing/notify.c
parent4a2cc231d22a82ed21771a72508f15d21ed63227 (diff)
downloadsamba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.bz2
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.zip
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/printing/notify.c')
-rw-r--r--source3/printing/notify.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index e289eba1b6..e71d9e6f25 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -176,13 +176,15 @@ static void print_notify_send_messages_to_printer(const char *printer, unsigned
return;
for (i = 0; i < num_pids; i++) {
- unsigned int q_len = messages_pending_for_pid(pid_list[i]);
+ unsigned int q_len = messages_pending_for_pid(pid_to_procid(pid_list[i]));
if (q_len > 1000) {
DEBUG(5, ("print_notify_send_messages_to_printer: discarding notify to printer %s as queue length = %u\n",
printer, q_len ));
continue;
}
- message_send_pid_with_timeout(pid_list[i], MSG_PRINTER_NOTIFY2, buf, offset, True, timeout);
+ message_send_pid_with_timeout(pid_to_procid(pid_list[i]),
+ MSG_PRINTER_NOTIFY2,
+ buf, offset, True, timeout);
}
}
@@ -328,7 +330,7 @@ static void send_notify_field_values(const char *sharename, uint32 type,
static void send_notify_field_buffer(const char *sharename, uint32 type,
uint32 field, uint32 id, uint32 len,
- char *buffer)
+ const char *buffer)
{
struct spoolss_notify_msg *msg;
@@ -349,7 +351,7 @@ static void send_notify_field_buffer(const char *sharename, uint32 type,
msg->field = field;
msg->id = id;
msg->len = len;
- msg->notify.data = buffer;
+ msg->notify.data = CONST_DISCARD(char *,buffer);
send_spoolss_notify2_msg(msg);
}
@@ -484,7 +486,7 @@ void notify_printer_location(int snum, char *location)
snum, strlen(location) + 1, location);
}
-void notify_printer_byname( const char *printername, uint32 change, char *value )
+void notify_printer_byname( const char *printername, uint32 change, const char *value )
{
int snum = print_queue_snum(printername);
int type = PRINTER_NOTIFY_TYPE;