samldb: Allow automatic generation of mAPIIDs
[sfrench/samba-autobuild/.git] / source4 / lib / socket / connect.c
index d74a7b483308073a1745afb1acc0df2a16613197..1da8b41bbd7c056f3bf4850aee9771e1dcf52adb 100644 (file)
@@ -34,16 +34,16 @@ struct connect_state {
        uint32_t flags;
 };
 
-static void socket_connect_handler(struct event_context *ev,
-                                  struct fd_event *fde, 
-                                  uint16_t flags, void *private);
+static void socket_connect_handler(struct tevent_context *ev,
+                                  struct tevent_fd *fde, 
+                                  uint16_t flags, void *private_data);
 
 /*
   call the real socket_connect() call, and setup event handler
 */
 static void socket_send_connect(struct composite_context *result)
 {
-       struct fd_event *fde;
+       struct tevent_fd *fde;
        struct connect_state *state = talloc_get_type(result->private_data, 
                                                      struct connect_state);
 
@@ -58,9 +58,9 @@ static void socket_send_connect(struct composite_context *result)
                return;
        }
 
-       fde = event_add_fd(result->event_ctx, result,
+       fde = tevent_add_fd(result->event_ctx, result,
                           socket_get_fd(state->sock),
-                          EVENT_FD_READ|EVENT_FD_WRITE, 
+                          TEVENT_FD_READ|TEVENT_FD_WRITE,
                           socket_connect_handler, result);
        composite_nomem(fde, result);
 }
@@ -73,7 +73,7 @@ struct composite_context *socket_connect_send(struct socket_context *sock,
                                              struct socket_address *my_address,
                                              struct socket_address *server_address, 
                                              uint32_t flags,
-                                             struct event_context *event_ctx)
+                                             struct tevent_context *event_ctx)
 {
        struct composite_context *result;
        struct connect_state *state;
@@ -116,12 +116,12 @@ struct composite_context *socket_connect_send(struct socket_context *sock,
 /*
   handle write events on connect completion
 */
-static void socket_connect_handler(struct event_context *ev,
-                                  struct fd_event *fde, 
-                                  uint16_t flags, void *private)
+static void socket_connect_handler(struct tevent_context *ev,
+                                  struct tevent_fd *fde, 
+                                  uint16_t flags, void *private_data)
 {
        struct composite_context *result =
-               talloc_get_type(private, struct composite_context);
+               talloc_get_type(private_data, struct composite_context);
        struct connect_state *state = talloc_get_type(result->private_data,
                                                      struct connect_state);
 
@@ -149,7 +149,7 @@ NTSTATUS socket_connect_ev(struct socket_context *sock,
                           struct socket_address *my_address,
                           struct socket_address *server_address, 
                           uint32_t flags,
-                          struct event_context *ev)
+                          struct tevent_context *ev)
 {
        struct composite_context *ctx;
        ctx = socket_connect_send(sock, my_address,