]> code.delx.au - pulseaudio/blobdiff - src/modules/module-rescue-streams.c
Remove pa_bool_t and replace it with bool.
[pulseaudio] / src / modules / module-rescue-streams.c
index 722d84b29ac9d247401c56c9e823a9fb16c7f8e4..7035a35097da47c1a1f4cf50b6a678518a47b9e1 100644 (file)
@@ -36,9 +36,9 @@
 #include "module-rescue-streams-symdef.h"
 
 PA_MODULE_AUTHOR("Lennart Poettering");
-PA_MODULE_DESCRIPTION("When a sink/source is removed, try to move their streams to the default sink/source");
+PA_MODULE_DESCRIPTION("When a sink/source is removed, try to move its streams to the default sink/source");
 PA_MODULE_VERSION(PACKAGE_VERSION);
-PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_LOAD_ONCE(true);
 
 static const char* const valid_modargs[] = {
     NULL,
@@ -104,11 +104,11 @@ static pa_hook_result_t sink_unlink_hook_callback(pa_core *c, pa_sink *sink, voi
         if (!(target = find_evacuation_sink(c, i, sink)))
             continue;
 
-        if (pa_sink_input_move_to(i, target, FALSE) < 0)
+        if (pa_sink_input_move_to(i, target, false) < 0)
             pa_log_info("Failed to move sink input %u \"%s\" to %s.", i->index,
                         pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         else
-            pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index,
+            pa_log_info("Successfully moved sink input %u \"%s\" to %s.", i->index,
                         pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
     }
 
@@ -128,13 +128,13 @@ static pa_hook_result_t sink_input_move_fail_hook_callback(pa_core *c, pa_sink_i
     if (!(target = find_evacuation_sink(c, i, NULL)))
         return PA_HOOK_OK;
 
-    if (pa_sink_input_finish_move(i, target, FALSE) < 0) {
+    if (pa_sink_input_finish_move(i, target, false) < 0) {
         pa_log_info("Failed to move sink input %u \"%s\" to %s.", i->index,
                         pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         return PA_HOOK_OK;
 
     } else {
-        pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index,
+        pa_log_info("Successfully moved sink input %u \"%s\" to %s.", i->index,
                     pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         return PA_HOOK_STOP;
     }
@@ -159,7 +159,7 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
         if (target == skip)
             continue;
 
-        if (!target->monitor_of != !skip->monitor_of)
+        if (skip && !target->monitor_of != !skip->monitor_of)
             continue;
 
         if (!PA_SOURCE_IS_LINKED(pa_source_get_state(target)))
@@ -195,11 +195,11 @@ static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *sourc
         if (!(target = find_evacuation_source(c, o, source)))
             continue;
 
-        if (pa_source_output_move_to(o, target, FALSE) < 0)
+        if (pa_source_output_move_to(o, target, false) < 0)
             pa_log_info("Failed to move source output %u \"%s\" to %s.", o->index,
                         pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         else
-            pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index,
+            pa_log_info("Successfully moved source output %u \"%s\" to %s.", o->index,
                         pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME)), target->name);
     }
 
@@ -219,13 +219,13 @@ static pa_hook_result_t source_output_move_fail_hook_callback(pa_core *c, pa_sou
     if (!(target = find_evacuation_source(c, i, NULL)))
         return PA_HOOK_OK;
 
-    if (pa_source_output_finish_move(i, target, FALSE) < 0) {
+    if (pa_source_output_finish_move(i, target, false) < 0) {
         pa_log_info("Failed to move source input %u \"%s\" to %s.", i->index,
                         pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         return PA_HOOK_OK;
 
     } else {
-        pa_log_info("Sucessfully moved source input %u \"%s\" to %s.", i->index,
+        pa_log_info("Successfully moved source input %u \"%s\" to %s.", i->index,
                     pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
         return PA_HOOK_STOP;
     }