s3:lib: s/struct event_context/struct tevent_context
authorStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2013 09:00:26 +0000 (10:00 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 19 Feb 2013 22:47:54 +0000 (23:47 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/include/messages.h
source3/include/proto.h
source3/lib/ctdbd_conn.c
source3/lib/messages.c
source3/lib/messages_ctdbd.c
source3/lib/util.c
source3/lib/util_sock.c

index 4b45901afda2fe6718fce6af9895d3efde1dac1e..12fc4399693cadfd05be6b9441b2a6cdb52870ab 100644 (file)
@@ -77,7 +77,7 @@ struct messaging_rec;
 
 struct messaging_context {
        struct server_id id;
-       struct event_context *event_ctx;
+       struct tevent_context *event_ctx;
        struct messaging_callback *callbacks;
 
        struct messaging_backend *local;
@@ -111,7 +111,7 @@ bool message_send_all(struct messaging_context *msg_ctx,
                      const void *buf, size_t len,
                      int *n_sent);
 struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, 
-                                        struct event_context *ev);
+                                        struct tevent_context *ev);
 
 struct server_id messaging_server_id(const struct messaging_context *msg_ctx);
 
index 925039df7605218eb8301c84344bf2f5ca6aef3a..77b949037b71c292c1a6a1e163f17757aa538424 100644 (file)
@@ -392,7 +392,7 @@ ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, off_t pos);
 int set_blocking(int fd, bool set);
 NTSTATUS init_before_fork(void);
 NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
-                          struct event_context *ev_ctx,
+                          struct tevent_context *ev_ctx,
                           bool parent_longlived);
 void *malloc_(size_t size);
 void *Realloc(void *p, size_t size, bool free_old_on_error);
@@ -607,13 +607,13 @@ int open_socket_in(int type,
 NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
                         int timeout, int *pfd);
 struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
-                                       struct event_context *ev,
+                                       struct tevent_context *ev,
                                        const struct sockaddr_storage *pss,
                                        uint16_t port,
                                        int timeout);
 NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
 struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-                                             struct event_context *ev,
+                                             struct tevent_context *ev,
                                              struct timeval wait_time,
                                              const struct sockaddr_storage *pss,
                                              uint16_t port,
index 5417c672683e4e01263be14f3508c3167c936d82..4e66c176aa0951778df77738c81799a1cdf2e03a 100644 (file)
@@ -279,7 +279,7 @@ struct deferred_msg_state {
  * Timed event handler for the deferred message
  */
 
-static void deferred_message_dispatch(struct event_context *event_ctx,
+static void deferred_message_dispatch(struct tevent_context *event_ctx,
                                      struct timed_event *te,
                                      struct timeval now,
                                      void *private_data)
@@ -685,7 +685,7 @@ static NTSTATUS ctdb_handle_message(uint8_t *buf, size_t length,
  * The ctdbd socket is readable asynchronuously
  */
 
-static void ctdbd_socket_handler(struct event_context *event_ctx,
+static void ctdbd_socket_handler(struct tevent_context *event_ctx,
                                 struct fd_event *event,
                                 uint16 flags,
                                 void *private_data)
index cd763e7265af048e53855db3dcde054114478349..b60ab79e362a8f445b88195f242a755f14866d3e 100644 (file)
@@ -184,7 +184,7 @@ bool message_send_all(struct messaging_context *msg_ctx,
 }
 
 struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, 
-                                        struct event_context *ev)
+                                        struct tevent_context *ev)
 {
        struct messaging_context *ctx;
        NTSTATUS status;
index 949fb272805e599340940123fbe0120a9dd81820..234f8f9e1b58b885ab1d8507d6e6d4842e9924ee 100644 (file)
@@ -65,7 +65,7 @@ struct ctdbd_connection *messaging_ctdbd_connection(void)
 
        if (global_ctdb_connection_pid == 0 &&
            global_ctdbd_connection == NULL) {
-               struct event_context *ev;
+               struct tevent_context *ev;
                struct messaging_context *msg;
 
                ev = samba_tevent_context_init(NULL);
index e0cae91a0da854b7570c0eaa1e0c1db6ea887d19..d21c730f3ba408b3eedb341489befd3be58033bf 100644 (file)
@@ -428,7 +428,7 @@ static void reinit_after_fork_pipe_handler(struct tevent_context *ev,
 
 
 NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
-                          struct event_context *ev_ctx,
+                          struct tevent_context *ev_ctx,
                           bool parent_longlived)
 {
        NTSTATUS status = NT_STATUS_OK;
index 679af9ccb4337c5ef4544628ae29c5e3b4569b41..8f212e5d851efc7412f076d3d595626ff96b6292 100644 (file)
@@ -502,7 +502,7 @@ int open_socket_in(int type,
 
 struct open_socket_out_state {
        int fd;
-       struct event_context *ev;
+       struct tevent_context *ev;
        struct sockaddr_storage ss;
        socklen_t salen;
        uint16_t port;
@@ -524,7 +524,7 @@ static int open_socket_out_state_destructor(struct open_socket_out_state *s)
 **************************************************************************/
 
 struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx,
-                                       struct event_context *ev,
+                                       struct tevent_context *ev,
                                        const struct sockaddr_storage *pss,
                                        uint16_t port,
                                        int timeout)
@@ -691,7 +691,7 @@ NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
                         int timeout, int *pfd)
 {
        TALLOC_CTX *frame = talloc_stackframe();
-       struct event_context *ev;
+       struct tevent_context *ev;
        struct tevent_req *req;
        NTSTATUS status = NT_STATUS_NO_MEMORY;
 
@@ -715,7 +715,7 @@ NTSTATUS open_socket_out(const struct sockaddr_storage *pss, uint16_t port,
 }
 
 struct open_socket_out_defer_state {
-       struct event_context *ev;
+       struct tevent_context *ev;
        struct sockaddr_storage ss;
        uint16_t port;
        int timeout;
@@ -726,7 +726,7 @@ static void open_socket_out_defer_waited(struct tevent_req *subreq);
 static void open_socket_out_defer_connected(struct tevent_req *subreq);
 
 struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-                                             struct event_context *ev,
+                                             struct tevent_context *ev,
                                              struct timeval wait_time,
                                              const struct sockaddr_storage *pss,
                                              uint16_t port,