audiod: Don't unregister tasks, just set the error value.
[paraslash.git] / 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];
 
        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);
                                i);
-                       wng_unregister(s->wng);
                        s->wng->task.error = error;
                }
                        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;
                }
                        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;
                }
        }
                        s->receiver_node->task.error = error;
                }
        }