[MINOR] move the initial task's nice value to the listener

Since the listener is the one indicating what analyser and session
handlers to call, it makes sense that it also sets the task's nice
value. This also helps getting rid of the last trace of the stats
in the proto_uxst file.
diff --git a/include/types/protocols.h b/include/types/protocols.h
index 0b4b712..9247ef1 100644
--- a/include/types/protocols.h
+++ b/include/types/protocols.h
@@ -2,7 +2,7 @@
   include/types/protocols.h
   This file defines the structures used by generic network protocols.
 
-  Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
+  Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -90,6 +90,7 @@
 	int  *timeout;                  /* pointer to client-side timeout */
 	void *private;			/* any private data which may be used by accept() */
 	unsigned int analysers;		/* bitmap of required protocol analysers */
+	int nice;			/* nice value to assign to the instanciated tasks */
 	union {				/* protocol-dependant access restrictions */
 		struct {		/* UNIX socket permissions */
 			uid_t uid;	/* -1 to leave unchanged */
diff --git a/src/client.c b/src/client.c
index 93bd894..b2e7d78 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1,7 +1,7 @@
 /*
  * Client-side variables and functions.
  *
- * Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -173,6 +173,7 @@
 
 		t->process = l->handler;
 		t->context = s;
+		t->nice = l->nice;
 
 		s->task = t;
 		s->listener = l;
diff --git a/src/dumpstats.c b/src/dumpstats.c
index 91c90e9..24aab05 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -121,6 +121,7 @@
 		global.stats_sock.accept = uxst_event_accept;
 		global.stats_sock.handler = process_session;
 		global.stats_sock.analysers = AN_REQ_STATS_SOCK;
+		global.stats_sock.nice = -64;  /* we want to boost priority for local stats */
 		global.stats_sock.private = global.stats_fe; /* must point to the frontend */
 
 		global.stats_fe->timeout.client = MS_TO_TICKS(10000); /* default timeout of 10 seconds */
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 5078369..880ec99 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -1,7 +1,7 @@
 /*
  * UNIX SOCK_STREAM protocol layer (uxst)
  *
- * Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -432,7 +432,7 @@
 
 		t->process = l->handler;
 		t->context = s;
-		t->nice = -64;  /* we want to boost priority for local stats */
+		t->nice = l->nice;
 
 		s->task = t;
 		s->listener = l;