From 36acd6e79c8cb881b9c333313402d993a6d0f511 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 12 Dec 2005 21:31:42 +0000 Subject: r12200: - move the the winsreplication client and server code to the packet_context system - this needs to be in one big patch, because of the merging code, that changes client in server connections and the other way around - use socket_connect_send/_recv() in the client code metze (This used to be commit f0105b7fcdc3032d22444a1973927fff2dd9a06f) --- source4/libcli/wrepl/winsrepl.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'source4/libcli/wrepl/winsrepl.h') diff --git a/source4/libcli/wrepl/winsrepl.h b/source4/libcli/wrepl/winsrepl.h index 89a4c642b2..9bedfe7548 100644 --- a/source4/libcli/wrepl/winsrepl.h +++ b/source4/libcli/wrepl/winsrepl.h @@ -28,17 +28,16 @@ */ struct wrepl_socket { struct socket_context *sock; - struct event_context *event_ctx; + struct packet_context *packet; - /* a queue of requests pending to be sent */ - struct wrepl_request *send_queue; + struct { + struct event_context *ctx; + struct fd_event *fde; + } event; /* a queue of replies waiting to be received */ struct wrepl_request *recv_queue; - /* the fd event */ - struct fd_event *fde; - /* the default timeout for requests, 0 means no timeout */ #define WREPL_SOCKET_REQUEST_TIMEOUT (60) uint32_t request_timeout; @@ -50,8 +49,13 @@ struct wrepl_socket { BOOL dead; }; +struct wrepl_send_ctrl { + BOOL send_only; + BOOL disconnect_after_send; +}; + enum wrepl_request_state { - WREPL_REQUEST_SEND = 0, + WREPL_REQUEST_INIT = 0, WREPL_REQUEST_RECV = 1, WREPL_REQUEST_DONE = 2, WREPL_REQUEST_ERROR = 3 @@ -65,16 +69,9 @@ struct wrepl_request { struct wrepl_socket *wrepl_socket; enum wrepl_request_state state; + BOOL trigger; NTSTATUS status; - DATA_BLOB buffer; - - BOOL disconnect_after_send; - - BOOL send_only; - - size_t num_read; - struct timed_event *te; struct wrepl_packet *packet; -- cgit