1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-26 23:33:15 +03:00

r4728: split up server_services into:

- stream_socket services
  the smb, ldap and rpc service which sets up a srtam socket end then
  waits for connections
and
- task services
  which this you can create a seperate task that do something
  (this is also going through the process_model subsystem
  so with -M standard a new process for this created
  with -M thread a new thread ...

I'll add datagram services later when we whave support for datagram sockets in lib/socket/

see the next commit as an example for service_task's

metze
This commit is contained in:
Stefan Metzmacher
2005-01-14 01:32:56 +00:00
committed by Gerald (Jerry) Carter
parent 05c3d1c4a6
commit d5fa02746c
21 changed files with 566 additions and 494 deletions

View File

@@ -1220,7 +1220,7 @@ NTSTATUS dcesrv_init_ipc_context(TALLOC_CTX *mem_ctx, struct dcesrv_context **_d
return NT_STATUS_OK;
}
static void dcesrv_init(struct server_service *service, const struct model_ops *model_ops)
static void dcesrv_init(struct server_service *service)
{
NTSTATUS status;
struct dcesrv_context *dce_ctx;
@@ -1235,7 +1235,9 @@ static void dcesrv_init(struct server_service *service, const struct model_ops *
return;
}
dcesrv_sock_init(service, model_ops, dce_ctx);
service->service.private_data = dce_ctx;
dcesrv_sock_init(service);
return;
}
@@ -1257,18 +1259,6 @@ static void dcesrv_send(struct server_connection *srv_conn,
dcesrv_sock_send(srv_conn, t, flags);
}
static void dcesrv_close(struct server_connection *srv_conn, const char *reason)
{
dcesrv_sock_close(srv_conn, reason);
return;
}
static void dcesrv_exit(struct server_service *service, const char *reason)
{
dcesrv_sock_exit(service, reason);
return;
}
/* the list of currently registered DCERPC endpoint servers.
*/
static struct ep_server {
@@ -1350,15 +1340,24 @@ const struct dcesrv_critical_sizes *dcerpc_module_version(void)
return &critical_sizes;
}
static const struct server_service_ops dcesrv_ops = {
static const struct server_stream_ops dcesrv_stream_ops = {
.name = "rpc",
.service_init = dcesrv_init,
.socket_init = NULL,
.accept_connection = dcesrv_accept,
.recv_handler = dcesrv_recv,
.send_handler = dcesrv_send,
.idle_handler = NULL,
.close_connection = dcesrv_close,
.service_exit = dcesrv_exit,
.close_connection = NULL
};
const struct server_stream_ops *dcesrv_get_stream_ops(void)
{
return &dcesrv_stream_ops;
}
static const struct server_service_ops dcesrv_ops = {
.name = "rpc",
.service_init = dcesrv_init,
};
const struct server_service_ops *dcesrv_get_ops(void)