diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-18 18:05:55 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-18 18:05:55 -0700 |
commit | e9a589feac531379e569bc39d803b16179002cfa (patch) | |
tree | 81fcaf840fa0ed4513e4d17d6e20f47434ca5ac5 /source4/wrepl_server | |
parent | ade5d43c5ceb915dd2210a735a21fd9bed531dd3 (diff) | |
download | samba-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/wrepl_server')
-rw-r--r-- | source4/wrepl_server/wrepl_periodic.c | 2 | ||||
-rw-r--r-- | source4/wrepl_server/wrepl_server.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/wrepl_server/wrepl_periodic.c b/source4/wrepl_server/wrepl_periodic.c index 4771544428..94391273ca 100644 --- a/source4/wrepl_server/wrepl_periodic.c +++ b/source4/wrepl_server/wrepl_periodic.c @@ -55,7 +55,7 @@ static void wreplsrv_periodic_handler_te(struct tevent_context *ev, struct teven status = wreplsrv_periodic_schedule(service, service->config.periodic_interval); if (!NT_STATUS_IS_OK(status)) { - task_server_terminate(service->task, nt_errstr(status)); + task_server_terminate(service->task, nt_errstr(status), false); return; } diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index c8316a5f4c..a33a3d685e 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -459,7 +459,7 @@ static void wreplsrv_task_init(struct task_server *task) service = talloc_zero(task, struct wreplsrv_service); if (!service) { - task_server_terminate(task, "wreplsrv_task_init: out of memory"); + task_server_terminate(task, "wreplsrv_task_init: out of memory", true); return; } service->task = task; @@ -471,7 +471,7 @@ static void wreplsrv_task_init(struct task_server *task) */ status = wreplsrv_open_winsdb(service, task->lp_ctx); if (!NT_STATUS_IS_OK(status)) { - task_server_terminate(task, "wreplsrv_task_init: wreplsrv_open_winsdb() failed"); + task_server_terminate(task, "wreplsrv_task_init: wreplsrv_open_winsdb() failed", true); return; } @@ -480,7 +480,7 @@ static void wreplsrv_task_init(struct task_server *task) */ status = wreplsrv_setup_partners(service); if (!NT_STATUS_IS_OK(status)) { - task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_partners() failed"); + task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_partners() failed", true); return; } @@ -490,13 +490,13 @@ static void wreplsrv_task_init(struct task_server *task) */ status = wreplsrv_setup_sockets(service, task->lp_ctx); if (!NT_STATUS_IS_OK(status)) { - task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_sockets() failed"); + task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_sockets() failed", true); return; } status = wreplsrv_setup_periodic(service); if (!NT_STATUS_IS_OK(status)) { - task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_periodic() failed"); + task_server_terminate(task, "wreplsrv_task_init: wreplsrv_setup_periodic() failed", true); return; } |