summaryrefslogtreecommitdiffstats
path: root/source4/wrepl_server/wrepl_in_call.c
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/wrepl_server/wrepl_in_call.c
parentb052ab8ad4ea31a45d61d5c6d8e34b6879848045 (diff)
downloadsamba-36acd6e79c8cb881b9c333313402d993a6d0f511.tar.gz
samba-36acd6e79c8cb881b9c333313402d993a6d0f511.tar.xz
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/wrepl_server/wrepl_in_call.c')
-rw-r--r--source4/wrepl_server/wrepl_in_call.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 718442a2884..d186152848f 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -106,7 +106,7 @@ static NTSTATUS wreplsrv_in_stop_association(struct wreplsrv_in_call *call)
}
/* this will cause to not receive packets anymore and terminate the connection if the reply is send */
- call->wreplconn->terminate = True;
+ call->terminate_after_send = True;
return wreplsrv_in_stop_assoc_ctx(call);
}
@@ -315,6 +315,7 @@ static NTSTATUS wreplsrv_in_update(struct wreplsrv_in_call *call)
struct wreplsrv_out_connection *wrepl_out;
struct wrepl_table *update_in = &call->req_packet.message.replication.info.table;
struct wreplsrv_in_update_state *update_state;
+ uint16_t fde_flags;
DEBUG(2,("WREPL_REPL_UPDATE: partner[%s] initiator[%s] num_owners[%u]\n",
call->wreplconn->partner->address,
@@ -325,6 +326,7 @@ static NTSTATUS wreplsrv_in_update(struct wreplsrv_in_call *call)
* and do a WREPL_REPL_SEND_REQUEST's on the that connection
* and then stop this connection
*/
+ fde_flags = event_get_fd_flags(wrepl_in->conn->event.fde);
talloc_free(wrepl_in->conn->event.fde);
wrepl_in->conn->event.fde = NULL;
@@ -339,9 +341,12 @@ static NTSTATUS wreplsrv_in_update(struct wreplsrv_in_call *call)
wrepl_out->assoc_ctx.peer_ctx = wrepl_in->assoc_ctx.peer_ctx;
wrepl_out->sock = wrepl_socket_merge(wrepl_out,
wrepl_in->conn->event.ctx,
- wrepl_in->conn->socket);
+ wrepl_in->conn->socket,
+ wrepl_in->packet);
NT_STATUS_HAVE_NO_MEMORY(wrepl_out->sock);
+ event_set_fd_flags(wrepl_out->sock->event.fde, fde_flags);
+
update_state->wrepl_in = wrepl_in;
update_state->wrepl_out = wrepl_out;
update_state->cycle_io.in.partner = wrepl_out->partner;