summaryrefslogtreecommitdiff
path: root/source4/libcli/wrepl/winsrepl.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-12 21:31:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:17 -0500
commit36acd6e79c8cb881b9c333313402d993a6d0f511 (patch)
tree29738d21349a159c3cd28d4577779c6c7e8f209e /source4/libcli/wrepl/winsrepl.h
parentb052ab8ad4ea31a45d61d5c6d8e34b6879848045 (diff)
downloadsamba-36acd6e79c8cb881b9c333313402d993a6d0f511.tar.gz
samba-36acd6e79c8cb881b9c333313402d993a6d0f511.tar.bz2
samba-36acd6e79c8cb881b9c333313402d993a6d0f511.zip
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)
Diffstat (limited to 'source4/libcli/wrepl/winsrepl.h')
-rw-r--r--source4/libcli/wrepl/winsrepl.h27
1 files changed, 12 insertions, 15 deletions
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;