summaryrefslogtreecommitdiff
path: root/source4/nbt_server
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
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')
-rw-r--r--source4/nbt_server/irpc.c8
-rw-r--r--source4/nbt_server/nbt_server.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/source4/nbt_server/irpc.c b/source4/nbt_server/irpc.c
index 951f1d296a..dbaebf66f7 100644
--- a/source4/nbt_server/irpc.c
+++ b/source4/nbt_server/irpc.c
@@ -180,7 +180,7 @@ void nbtd_register_irpc(struct nbtd_server *nbtsrv)
status = IRPC_REGISTER(task->msg_ctx, irpc, NBTD_INFORMATION,
nbtd_information, nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
- task_server_terminate(task, "nbtd failed to setup monitoring");
+ task_server_terminate(task, "nbtd failed to setup monitoring", true);
return;
}
@@ -188,7 +188,7 @@ void nbtd_register_irpc(struct nbtd_server *nbtsrv)
nbtd_getdcname, nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
task_server_terminate(task, "nbtd failed to setup getdcname "
- "handler");
+ "handler", true);
return;
}
@@ -196,7 +196,7 @@ void nbtd_register_irpc(struct nbtd_server *nbtsrv)
nbtd_proxy_wins_challenge, nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
task_server_terminate(task, "nbtd failed to setup wins challenge "
- "handler");
+ "handler", true);
return;
}
@@ -204,7 +204,7 @@ void nbtd_register_irpc(struct nbtd_server *nbtsrv)
nbtd_proxy_wins_release_demand, nbtsrv);
if (!NT_STATUS_IS_OK(status)) {
task_server_terminate(task, "nbtd failed to setup wins release demand "
- "handler");
+ "handler", true);
return;
}
}
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;
}