r3023: added immediate send of messages when they are first queued. This makes things...
authorAndrew Tridgell <tridge@samba.org>
Sun, 17 Oct 2004 13:33:03 +0000 (13:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:59 +0000 (12:59 -0500)
(This used to be commit 8380225d326e4bfb3f15fddc72c097870713132a)

source4/lib/messaging/messaging.c
source4/torture/local/messaging.c

index 7e87ea45df028936511fff8fd5fa65c4beb0920e..2f9a43c847d119ef20b7ac7a5f70377ed7d60541 100644 (file)
@@ -375,6 +375,8 @@ NTSTATUS messaging_send(void *msg_ctx, servid_t server, uint32_t msg_type, DATA_
 
        talloc_set_destructor(rec, rec_destructor);
 
 
        talloc_set_destructor(rec, rec_destructor);
 
+       messaging_send_handler(msg->event.ev, rec->fde, 0, EVENT_FD_WRITE);
+
        return NT_STATUS_OK;
 }
 
        return NT_STATUS_OK;
 }
 
index 8fbb38db4596db17e08889014a168122cc7aa84e..d4aaf80f4f47edddb803feae1a5d785c867fac82 100644 (file)
@@ -93,11 +93,7 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx)
                        ping_count++;
                }
 
                        ping_count++;
                }
 
-               while (ping_count > pong_count + 20) {
-                       event_loop_once(ev);
-                       event_loop_once(ev);
-                       event_loop_once(ev);
-                       event_loop_once(ev);
+               while (ping_count > pong_count + 10) {
                        event_loop_once(ev);
                }
        }
                        event_loop_once(ev);
                }
        }
@@ -110,7 +106,6 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx)
 
        printf("sending exit\n");
        messaging_send(msg_ctx, 1, MY_EXIT, NULL);
 
        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);
 
        if (ping_count != pong_count) {
                printf("ping test failed! received %d, sent %d\n", pong_count, ping_count);