#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,
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);
}
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;
}
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)))
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);
}
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;
}