]> git.tue.mpg.de Git - paraslash.git/commitdiff
client.c: Fix error value of supervisor task.
authorAndre Noll <maan@systemlinux.org>
Tue, 1 Apr 2008 20:42:00 +0000 (22:42 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 1 Apr 2008 20:42:00 +0000 (22:42 +0200)
client.c
error.h

index f47a0bec46a8c0d57f4ed2c22490a359ebbe8aed..c923552787fe4843c158e8d9e7a11a05b0e9852b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -35,7 +35,7 @@ static void supervisor_pre_select(struct sched *s, struct task *t)
                ct->inbuf = sit.buf;
                ct->in_loaded = &sit.loaded;
                ct->in_error = &sit.task.error;
-               t->error = -1;
+               t->error = -E_TASK_STARTED;
                goto min_delay;
        }
        if (ct->status == CL_RECEIVING) {
@@ -44,7 +44,7 @@ static void supervisor_pre_select(struct sched *s, struct task *t)
                sot.loaded = &ct->loaded;
                sot.input_error = &ct->task.error;
                register_task(&sot.task);
-               t->error = -1;
+               t->error = -E_TASK_STARTED;
                goto min_delay;
        }
        return;
diff --git a/error.h b/error.h
index 41ea245912f6e30d46fac54467447988bb0ffb37..f492eff190b4bfaf67871ba3fe9fda8fc550b400 100644 (file)
--- a/error.h
+++ b/error.h
@@ -13,7 +13,6 @@ DEFINE_ERRLIST_OBJECT_ENUM;
 
 /* these do not need error handling (yet) */
 #define SERVER_ERRORS
-#define CLIENT_ERRORS
 #define WAV_ERRORS
 #define COMPRESS_ERRORS
 #define TIME_ERRORS
@@ -32,6 +31,10 @@ DEFINE_ERRLIST_OBJECT_ENUM;
 
 extern const char **para_errlist[];
 
+#define CLIENT_ERRORS \
+       PARA_ERROR(TASK_STARTED, "task started"), \
+
+
 #define AFH_ERRORS \
        PARA_ERROR(AFH_SYNTAX, "afh syntax error"), \
        PARA_ERROR(AFH_SHORT_WRITE, "afh short write"), \