summaryrefslogtreecommitdiff
path: root/source4/nbt_server/nbt_server.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-18 18:05:55 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-18 18:05:55 -0700
commite9a589feac531379e569bc39d803b16179002cfa (patch)
tree81fcaf840fa0ed4513e4d17d6e20f47434ca5ac5 /source4/nbt_server/nbt_server.c
parentade5d43c5ceb915dd2210a735a21fd9bed531dd3 (diff)
downloadsamba-e9a589feac531379e569bc39d803b16179002cfa.tar.gz
samba-e9a589feac531379e569bc39d803b16179002cfa.tar.bz2
samba-e9a589feac531379e569bc39d803b16179002cfa.zip
s4-server: kill main daemon if a task fails to initialise
When one of our core tasks fails to initialise it can now ask for the server as a whole to die, rather than limping along in a degraded state.
Diffstat (limited to 'source4/nbt_server/nbt_server.c')
-rw-r--r--source4/nbt_server/nbt_server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index e6ff5003bf..4a02feb6fc 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -42,7 +42,7 @@ static void nbtd_task_init(struct task_server *task)
load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
if (iface_count(ifaces) == 0) {
- task_server_terminate(task, "nbtd: no network interfaces configured");
+ task_server_terminate(task, "nbtd: no network interfaces configured", false);
return;
}
@@ -50,7 +50,7 @@ static void nbtd_task_init(struct task_server *task)
nbtsrv = talloc(task, struct nbtd_server);
if (nbtsrv == NULL) {
- task_server_terminate(task, "nbtd: out of memory");
+ task_server_terminate(task, "nbtd: out of memory", true);
return;
}
@@ -62,20 +62,20 @@ static void nbtd_task_init(struct task_server *task)
/* start listening on the configured network interfaces */
status = nbtd_startup_interfaces(nbtsrv, task->lp_ctx, ifaces);
if (!NT_STATUS_IS_OK(status)) {
- task_server_terminate(task, "nbtd failed to setup interfaces");
+ task_server_terminate(task, "nbtd failed to setup interfaces", true);
return;
}
nbtsrv->sam_ctx = samdb_connect(nbtsrv, task->event_ctx, task->lp_ctx, system_session(nbtsrv, task->lp_ctx));
if (nbtsrv->sam_ctx == NULL) {
- task_server_terminate(task, "nbtd failed to open samdb");
+ task_server_terminate(task, "nbtd failed to open samdb", true);
return;
}
/* start the WINS server, if appropriate */
status = nbtd_winsserver_init(nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
- task_server_terminate(task, "nbtd failed to start WINS server");
+ task_server_terminate(task, "nbtd failed to start WINS server", true);
return;
}