s4:librpc: use tevent_ fn names instead of legacy event_ ones
authorSimo Sorce <ssorce@redhat.com>
Tue, 25 May 2010 19:27:11 +0000 (15:27 -0400)
committerSimo Sorce <idra@samba.org>
Sat, 13 Aug 2011 13:54:15 +0000 (09:54 -0400)
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc_connect.c
source4/librpc/rpc/dcerpc_sock.c

index 496cc0b2a684dd25e0980bbfa27c8c02d68167b9..77b1d2923621ac1af955c6f87987a2561dd08e60 100644 (file)
@@ -1180,7 +1180,7 @@ struct composite_context *dcerpc_bind_send(struct dcerpc_pipe *p,
                                                    true);
        if (!composite_is_ok(c)) return c;
 
-       event_add_timed(c->event_ctx, req,
+       tevent_add_timer(c->event_ctx, req,
                        timeval_current_ofs(DCERPC_REQUEST_TIMEOUT, 0),
                        dcerpc_timeout_handler, req);
 
@@ -1413,7 +1413,7 @@ static struct rpc_request *dcerpc_request_send(struct dcerpc_pipe *p,
        dcerpc_ship_next_request(p->conn);
 
        if (p->request_timeout) {
-               event_add_timed(dcerpc_event_context(p), req, 
+               tevent_add_timer(dcerpc_event_context(p), req,
                                timeval_current_ofs(p->request_timeout, 0), 
                                dcerpc_timeout_handler, req);
        }
@@ -1560,7 +1560,7 @@ static NTSTATUS dcerpc_request_recv(struct rpc_request *req,
 
        while (req->state != RPC_REQUEST_DONE) {
                struct tevent_context *ctx = dcerpc_event_context(req->p);
-               if (event_loop_once(ctx) != 0) {
+               if (tevent_loop_once(ctx) != 0) {
                        return NT_STATUS_CONNECTION_DISCONNECTED;
                }
        }
@@ -1931,7 +1931,7 @@ struct composite_context *dcerpc_alter_context_send(struct dcerpc_pipe *p,
        c->status = p->conn->transport.send_request(p->conn, &blob, true);
        if (!composite_is_ok(c)) return c;
 
-       event_add_timed(c->event_ctx, req,
+       tevent_add_timer(c->event_ctx, req,
                        timeval_current_ofs(DCERPC_REQUEST_TIMEOUT, 0),
                        dcerpc_timeout_handler, req);
 
index c236399b52940d8c24eb62ffb3ec4fecd78daf80..dc70736e3fd85ee5be996bbc4c07f8fc48b176c8 100644 (file)
@@ -759,7 +759,7 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent
        s->credentials  = credentials;
        s->lp_ctx       = lp_ctx;
 
-       event_add_timed(c->event_ctx, c,
+       tevent_add_timer(c->event_ctx, c,
                        timeval_current_ofs(DCERPC_REQUEST_TIMEOUT, 0),
                        dcerpc_connect_timeout_handler, c);
        
index 1dd993d94b2a3bdb9cde9823db6fa5926c7cf9d4..d0d28bc47e2d456447dcfe38245e904eb2d2c119 100644 (file)
@@ -134,7 +134,7 @@ static void sock_io_handler(struct tevent_context *ev, struct tevent_fd *fde,
                                                      struct dcecli_connection);
        struct sock_private *sock = (struct sock_private *)p->transport.private_data;
 
-       if (flags & EVENT_FD_WRITE) {
+       if (flags & TEVENT_FD_WRITE) {
                packet_queue_run(sock->packet);
                return;
        }
@@ -143,7 +143,7 @@ static void sock_io_handler(struct tevent_context *ev, struct tevent_fd *fde,
                return;
        }
 
-       if (flags & EVENT_FD_READ) {
+       if (flags & TEVENT_FD_READ) {
                packet_recv(sock->packet);
        }
 }
@@ -276,8 +276,8 @@ static void continue_socket_connect(struct composite_context *ctx)
        sock->pending_reads = 0;
        sock->server_name   = strupper_talloc(sock, s->target_hostname);
 
-       sock->fde = event_add_fd(conn->event_ctx, sock->sock, socket_get_fd(sock->sock),
-                                EVENT_FD_READ, sock_io_handler, conn);
+       sock->fde = tevent_add_fd(conn->event_ctx, sock->sock, socket_get_fd(sock->sock),
+                                TEVENT_FD_READ, sock_io_handler, conn);
        
        conn->transport.private_data = sock;