s4:messaging: use tevent_ function names instead of legacy event_ ones
authorSimo Sorce <ssorce@redhat.com>
Tue, 25 May 2010 19:25:26 +0000 (15:25 -0400)
committerSimo Sorce <idra@samba.org>
Sat, 13 Aug 2011 13:54:15 +0000 (09:54 -0400)
source4/lib/messaging/messaging.c
source4/lib/messaging/tests/irpc.c
source4/lib/messaging/tests/messaging.c

index ccc60032a6a0626dbfad5f98dee2a029f5bd633d..31440db4685a817c3c957aa946410a7909ebdcfe 100644 (file)
@@ -273,7 +273,7 @@ static void imessaging_send_handler(struct imessaging_context *msg)
                                              struct imessaging_rec *);
                                if (msg->retry_te == NULL) {
                                        msg->retry_te = 
-                                               event_add_timed(msg->event.ev, msg, 
+                                               tevent_add_timer(msg->event.ev, msg,
                                                                timeval_current_ofs(1, 0), 
                                                                msg_retry_timer, msg);
                                }
@@ -625,7 +625,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
        set_blocking(socket_get_fd(msg->sock), false);
 
        msg->event.ev   = ev;
-       msg->event.fde  = event_add_fd(ev, msg, socket_get_fd(msg->sock), 
+       msg->event.fde  = tevent_add_fd(ev, msg, socket_get_fd(msg->sock),
                                       EVENT_FD_READ, imessaging_handler, msg);
        tevent_fd_set_auto_close(msg->event.fde);
 
index 554a7efa99732afef7544e33b25f9b859ec899d7..c94765a1677870b2fc40912c29231b76b04367bd 100644 (file)
@@ -74,7 +74,7 @@ static void deferred_echodata(struct tevent_context *ev, struct tevent_timer *te
 static NTSTATUS irpc_EchoData(struct irpc_message *irpc, struct echo_EchoData *r)
 {
        irpc->defer_reply = true;
-       event_add_timed(irpc->ev, irpc, timeval_zero(), deferred_echodata, irpc);
+       tevent_add_timer(irpc->ev, irpc, timeval_zero(), deferred_echodata, irpc);
        return NT_STATUS_OK;
 }
 
@@ -218,14 +218,14 @@ static bool test_speed(struct torture_context *tctx,
                ping_count++;
 
                while (ping_count > pong_count + 20) {
-                       event_loop_once(data->ev);
+                       tevent_loop_once(data->ev);
                }
        }
 
        torture_comment(tctx, "waiting for %d remaining replies (done %d)\n", 
               ping_count - pong_count, pong_count);
        while (timeval_elapsed(&tv) < 30 && pong_count < ping_count) {
-               event_loop_once(data->ev);
+               tevent_loop_once(data->ev);
        }
 
        torture_assert_int_equal(tctx, ping_count, pong_count, "ping test failed");
index c5d37953d05c5fd23f6c0d7eac4216bbb2b9c434..c17b95e9c4c8807dddc18d402cc0875344faf507 100644 (file)
@@ -110,14 +110,14 @@ static bool test_ping_speed(struct torture_context *tctx)
                ping_count++;
 
                while (ping_count > pong_count + 20) {
-                       event_loop_once(ev);
+                       tevent_loop_once(ev);
                }
        }
 
        torture_comment(tctx, "waiting for %d remaining replies (done %d)\n", 
               ping_count - pong_count, pong_count);
        while (timeval_elapsed(&tv) < 30 && pong_count < ping_count) {
-               event_loop_once(ev);
+               tevent_loop_once(ev);
        }
 
        torture_comment(tctx, "sending exit\n");