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 f47a0be..c923552 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 41ea245..f492eff 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"), \