{
struct wreplsrv_service *service = partner->service;
struct wreplsrv_in_connection *wrepl_in;
- const struct model_ops *model_ops;
struct stream_connection *conn;
struct tevent_req *subreq;
NTSTATUS status;
- /* within the wrepl task we want to be a single process, so
- ask for the single process model ops and pass these to the
- stream_setup_socket() call. */
- model_ops = process_model_startup("single");
- if (!model_ops) {
- DEBUG(0,("Can't find 'single' process model_ops"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
wrepl_in = talloc_zero(partner, struct wreplsrv_in_connection);
NT_STATUS_HAVE_NO_MEMORY(wrepl_in);
status = stream_new_connection_merge(service->task->event_ctx,
service->task->lp_ctx,
- model_ops,
+ service->task->model_ops,
&wreplsrv_stream_ops,
service->task->msg_ctx,
wrepl_in,
{
NTSTATUS status;
struct task_server *task = service->task;
- const struct model_ops *model_ops;
const char *address;
uint16_t port = WINS_REPLICATION_PORT;
- /* within the wrepl task we want to be a single process, so
- ask for the single process model ops and pass these to the
- stream_setup_socket() call. */
- model_ops = process_model_startup("single");
- if (!model_ops) {
- DEBUG(0,("Can't find 'single' process model_ops"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
if (lpcfg_interfaces(lp_ctx) && lpcfg_bind_interfaces_only(lp_ctx)) {
int num_interfaces;
int i;
continue;
}
address = iface_list_n_ip(ifaces, i);
- status = stream_setup_socket(task, task->event_ctx,
- task->lp_ctx, model_ops,
- &wreplsrv_stream_ops,
- "ipv4", address, &port,
- lpcfg_socket_options(task->lp_ctx),
- service, task->process_context);
+ status = stream_setup_socket(
+ task, task->event_ctx,
+ task->lp_ctx,
+ task->model_ops,
+ &wreplsrv_stream_ops,
+ "ipv4", address, &port,
+ lpcfg_socket_options(task->lp_ctx),
+ service, task->process_context);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("stream_setup_socket(address=%s,port=%u) failed - %s\n",
address, port, nt_errstr(status)));
}
} else {
address = "0.0.0.0";
- status = stream_setup_socket(task, task->event_ctx, task->lp_ctx,
- model_ops, &wreplsrv_stream_ops,
- "ipv4", address, &port, lpcfg_socket_options(task->lp_ctx),
+ status = stream_setup_socket(task, task->event_ctx,
+ task->lp_ctx, task->model_ops,
+ &wreplsrv_stream_ops,
+ "ipv4", address, &port,
+ lpcfg_socket_options(task->lp_ctx),
service, task->process_context);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("stream_setup_socket(address=%s,port=%u) failed - %s\n",