summaryrefslogtreecommitdiffstats
path: root/source4/smbd/process_single.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/smbd/process_single.c
parentade5d43c5ceb915dd2210a735a21fd9bed531dd3 (diff)
downloadsamba-e9a589feac531379e569bc39d803b16179002cfa.tar.gz
samba-e9a589feac531379e569bc39d803b16179002cfa.tar.xz
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/smbd/process_single.c')
-rw-r--r--source4/smbd/process_single.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index 738ace95c7d..ff57a0bc34b 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