summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-21 01:25:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:18 -0500
commitc8064e1f9294ec77b198d55998347c7a962e03e5 (patch)
tree14d8e06ab23ecfc425294d02ff180c4630fc82a7 /source4
parent798e4c687c529c0fce06d8680849f37d30e7b3b8 (diff)
downloadsamba-c8064e1f9294ec77b198d55998347c7a962e03e5.tar.gz
samba-c8064e1f9294ec77b198d55998347c7a962e03e5.tar.bz2
samba-c8064e1f9294ec77b198d55998347c7a962e03e5.zip
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. (This used to be commit 45c0580e5d3b18301bc5706423bb407d001fb61d)
Diffstat (limited to 'source4')
-rw-r--r--source4/ldap_server/ldap_server.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 9b4055f8cf..d48c0664d7 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/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;
}