diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-17 13:33:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:59 -0500 |
commit | 6cc8941f05d5c41e04d83382a7e282fcc191ccd1 (patch) | |
tree | 3ca4d87d327604eee489c8cdbc448363bc668c9e | |
parent | 605560149e544aaa889e352232c26450d7a0c84f (diff) | |
download | samba-6cc8941f05d5c41e04d83382a7e282fcc191ccd1.tar.gz samba-6cc8941f05d5c41e04d83382a7e282fcc191ccd1.tar.bz2 samba-6cc8941f05d5c41e04d83382a7e282fcc191ccd1.zip |
r3023: added immediate send of messages when they are first queued. This makes things a bit more efficient
(This used to be commit 8380225d326e4bfb3f15fddc72c097870713132a)
-rw-r--r-- | source4/lib/messaging/messaging.c | 2 | ||||
-rw-r--r-- | source4/torture/local/messaging.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 7e87ea45df..2f9a43c847 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -375,6 +375,8 @@ NTSTATUS messaging_send(void *msg_ctx, servid_t server, uint32_t msg_type, DATA_ talloc_set_destructor(rec, rec_destructor); + messaging_send_handler(msg->event.ev, rec->fde, 0, EVENT_FD_WRITE); + return NT_STATUS_OK; } diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c index 8fbb38db45..d4aaf80f4f 100644 --- a/source4/torture/local/messaging.c +++ b/source4/torture/local/messaging.c @@ -93,11 +93,7 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx) 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); } } @@ -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); - event_loop_once(ev); if (ping_count != pong_count) { printf("ping test failed! received %d, sent %d\n", pong_count, ping_count); |