Author: vlendec
Date: 2005-08-25 17:46:13 +0000 (Thu, 25 Aug 2005)
New Revision: 9619

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9619

Log:
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

Modified:
   branches/SAMBA_3_0/source/lib/messages.c
   trunk/source/lib/messages.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/messages.c
===================================================================
--- branches/SAMBA_3_0/source/lib/messages.c    2005-08-25 17:15:23 UTC (rev 
9618)
+++ branches/SAMBA_3_0/source/lib/messages.c    2005-08-25 17:46:13 UTC (rev 
9619)
@@ -314,7 +314,7 @@
        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) {

Modified: trunk/source/lib/messages.c
===================================================================
--- trunk/source/lib/messages.c 2005-08-25 17:15:23 UTC (rev 9618)
+++ trunk/source/lib/messages.c 2005-08-25 17:46:13 UTC (rev 9619)
@@ -314,7 +314,7 @@
        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) {

Reply via email to