From 45c0580e5d3b18301bc5706423bb407d001fb61d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Aug 2006 01:25:20 +0000 Subject: [PATCH] r17644: change the ldap server to always use the single process model. We are not aiming to produce a high performance parallel ldap server, so better to reserve the extra CPUs on a SMP box for file serving. --- source/ldap_server/ldap_server.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/ldap_server/ldap_server.c b/source/ldap_server/ldap_server.c index 9b4055f8cf6..d48c0664d7c 100644 --- a/source/ldap_server/ldap_server.c +++ b/source/ldap_server/ldap_server.c @@ -31,6 +31,7 @@ #include "smbd/service_task.h" #include "smbd/service_stream.h" #include "smbd/service.h" +#include "smbd/process_model.h" #include "lib/tls/tls.h" #include "lib/messaging/irpc.h" #include "lib/ldb/include/ldb.h" @@ -472,9 +473,14 @@ static void ldapsrv_task_init(struct task_server *task) { struct ldapsrv_service *ldap_service; NTSTATUS status; + const struct model_ops *model_ops; task_server_set_title(task, "task[ldapsrv]"); + /* run the ldap server as a single process */ + model_ops = process_model_byname("single"); + if (!model_ops) goto failed; + ldap_service = talloc_zero(task, struct ldapsrv_service); if (ldap_service == NULL) goto failed; @@ -491,11 +497,11 @@ static void ldapsrv_task_init(struct task_server *task) */ for(i = 0; i < num_interfaces; i++) { const char *address = iface_n_ip(i); - status = add_socket(task->event_ctx, task->model_ops, address, ldap_service); + status = add_socket(task->event_ctx, model_ops, address, ldap_service); if (!NT_STATUS_IS_OK(status)) goto failed; } } else { - status = add_socket(task->event_ctx, task->model_ops, lp_socket_address(), ldap_service); + status = add_socket(task->event_ctx, model_ops, lp_socket_address(), ldap_service); if (!NT_STATUS_IS_OK(status)) goto failed; } -- 2.34.1