From e9a589feac531379e569bc39d803b16179002cfa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Sep 2009 18:05:55 -0700 Subject: 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. --- source4/smbd/process_single.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/smbd/process_single.c') diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index 738ace95c7..ff57a0bc34 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -84,7 +84,9 @@ static void single_new_task(struct tevent_context *ev, void (*new_task)(struct tevent_context *, struct loadparm_context *, struct server_id, void *), void *private_data) { - static uint32_t taskid = 0; + /* start our taskids at 1, zero is reserved for the top + level samba task */ + static uint32_t taskid = 1; /* We use 1 so we cannot collide in with cluster ids generated * in the accept connection above, and unlikly to collide with -- cgit