audiod: Don't unregister tasks, just set the error value.
authorAndre Noll <maan@systemlinux.org>
Mon, 31 Mar 2008 23:07:03 +0000 (01:07 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 31 Mar 2008 23:07:03 +0000 (01:07 +0200)
This is a first step to get rid of unregister_task().

audiod.c

index a76ee1f..d3f45ec 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -212,20 +212,17 @@ static void kill_all_decoders(int error)
 
        FOR_EACH_SLOT(i) {
                struct slot_info *s = &slot[i];
-               if (s->wng && !s->wng->task.error) {
-                       PARA_INFO_LOG("unregistering writer node group in slot %d\n",
+               if (s->wng && s->wng->task.error >= 0) {
+                       PARA_INFO_LOG("deactivating wng in slot %d\n",
                                i);
-                       wng_unregister(s->wng);
                        s->wng->task.error = error;
                }
-               if (s->fc && !s->fc->task.error) {
-                       PARA_INFO_LOG("unregistering filter chain in slot %d\n", i);
-                       unregister_task(&s->fc->task);
+               if (s->fc && s->fc->task.error >= 0) {
+                       PARA_INFO_LOG("deactivatimg filter chain in slot %d\n", i);
                        s->fc->task.error = error;
                }
-               if (s->receiver_node && !s->receiver_node->task.error) {
-                       PARA_INFO_LOG("unregistering receiver_node in slot %d\n", i);
-                       unregister_task(&s->receiver_node->task);
+               if (s->receiver_node && s->receiver_node->task.error >= 0) {
+                       PARA_INFO_LOG("deactivating receiver_node in slot %d\n", i);
                        s->receiver_node->task.error = error;
                }
        }