summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-08-25 17:46:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:23 -0500
commit56fd626fe710f24201b1f413f8b7b28a919df0c4 (patch)
treedb01ae60a92132c304988e2403ab0d86eff709ab
parent013ac99a9dce268dcc46bccb8754aacced931157 (diff)
downloadsamba-56fd626fe710f24201b1f413f8b7b28a919df0c4.tar.gz
samba-56fd626fe710f24201b1f413f8b7b28a919df0c4.tar.bz2
samba-56fd626fe710f24201b1f413f8b7b28a919df0c4.zip
r9619: Fix messages_pending_for_pid actually do what it's meant to do. This might be
a big relief on messages.tdb contention as ignoring processes with >1000 messages in printing/notify.c should work correctly now. Jeremy, Jerry told me to ask you about printer scalability torture tests, this might be a reason why you implemented the message_send_pid_with_timeout using the signal (shudder) in the first place. :-) While looking at that... Wouldn't it be better to not use the signal but have an overall timeout for print_notify_send_messages using GetTimeOfDay & friends and not use the alarm signal deep inside tdb.c? Volker (This used to be commit b5e82bb512d3425839e061e78f4d6fe0bd05b708)
-rw-r--r--source3/lib/messages.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 21b5531c89..7d3addd86a 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -314,7 +314,7 @@ unsigned int messages_pending_for_pid(pid_t pid)
char *buf;
unsigned int message_count = 0;
- kbuf = message_key_pid(sys_getpid());
+ kbuf = message_key_pid(pid);
dbuf = tdb_fetch(tdb, kbuf);
if (dbuf.dptr == NULL || dbuf.dsize == 0) {