summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-02 19:28:26 +0000
committerJeremy Allison <jra@samba.org>2000-10-02 19:28:26 +0000
commite26d09685cf4aff2256adccf9b576d48fe52cc89 (patch)
tree37ffb99477c723630c7dbaea6610c080798c930e /source3/rpc_server
parent7de0b5588e855a967f0a5094c515b955ff4a23cf (diff)
downloadsamba-e26d09685cf4aff2256adccf9b576d48fe52cc89.tar.gz
samba-e26d09685cf4aff2256adccf9b576d48fe52cc89.tar.bz2
samba-e26d09685cf4aff2256adccf9b576d48fe52cc89.zip
Added debug so if zero length messages get sent we successfully remove
them (this can happen if smbd processes are shut down at the wrong time). Jeremy. (This used to be commit c1de97f96b8c5ad8e5f01a0d17c6387733769442)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 8996389039..6e222b2386 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -591,6 +591,13 @@ void srv_spoolss_receive_message(int msg_type, pid_t src, void *buf, size_t len)
*printer = '\0';
fstrcpy(printer,buf);
+ if (len == 0) {
+ DEBUG(0,("srv_spoolss_receive_message: got null message !\n"));
+ return;
+ }
+
+ DEBUG(10,("srv_spoolss_receive_message: Got message about printer %s\n", printer ));
+
find_printer = (Printer_entry *)ubi_dlFirst(&Printer_list);
/* Iterate the printer list. */
@@ -631,6 +638,8 @@ static BOOL srv_spoolss_sendnotify(POLICY_HND *handle)
fstrcpy(printer, "");
/*srv_spoolss_receive_message(printer);*/
+ DEBUG(10,("srv_spoolss_sendnotify: Sending message about printer %s\n", printer ));
+
message_send_all(MSG_PRINTER_NOTIFY, printer, strlen(printer) + 1); /* Null terminate... */
return True;