svn commit: samba r3023 - in branches/SAMBA_4_0/source: lib/messaging torture/local

tridge at samba.org tridge at samba.org
Sun Oct 17 13:33:03 GMT 2004


Author: tridge
Date: 2004-10-17 13:33:03 +0000 (Sun, 17 Oct 2004)
New Revision: 3023

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3023&nolog=1

Log:
added immediate send of messages when they are first queued. This makes things a bit more efficient








Modified:
   branches/SAMBA_4_0/source/lib/messaging/messaging.c
   branches/SAMBA_4_0/source/torture/local/messaging.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/messaging/messaging.c
===================================================================
--- branches/SAMBA_4_0/source/lib/messaging/messaging.c	2004-10-17 13:24:56 UTC (rev 3022)
+++ branches/SAMBA_4_0/source/lib/messaging/messaging.c	2004-10-17 13:33:03 UTC (rev 3023)
@@ -375,6 +375,8 @@
 
 	talloc_set_destructor(rec, rec_destructor);
 
+	messaging_send_handler(msg->event.ev, rec->fde, 0, EVENT_FD_WRITE);
+
 	return NT_STATUS_OK;
 }
 

Modified: branches/SAMBA_4_0/source/torture/local/messaging.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/messaging.c	2004-10-17 13:24:56 UTC (rev 3022)
+++ branches/SAMBA_4_0/source/torture/local/messaging.c	2004-10-17 13:33:03 UTC (rev 3023)
@@ -93,12 +93,8 @@
 			ping_count++;
 		}
 
-		while (ping_count > pong_count + 20) {
+		while (ping_count > pong_count + 10) {
 			event_loop_once(ev);
-			event_loop_once(ev);
-			event_loop_once(ev);
-			event_loop_once(ev);
-			event_loop_once(ev);
 		}
 	}
 
@@ -110,7 +106,6 @@
 
 	printf("sending exit\n");
 	messaging_send(msg_ctx, 1, MY_EXIT, NULL);
-	event_loop_once(ev);
 
 	if (ping_count != pong_count) {
 		printf("ping test failed! received %d, sent %d\n", pong_count, ping_count);



More information about the samba-cvs mailing list