summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-15 12:07:02 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-15 12:49:35 +0530
commit50b420aebd876557a64f9015e1197e7d12201f5f (patch)
treec4de493d415a70c50deaf666d33da92d4da8c979
parentb9d517cd515a6d53de592b7c33e47caaff738b6c (diff)
device-restore: Log invalid sink index while setting formats
This makes it easier to catch errors when using 'pactl set-sink-formats'
-rw-r--r--src/modules/module-device-restore.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 671ffd40..6c5c27e8 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -826,8 +826,10 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
}
/* Now find our sink */
- if (!(sink = pa_idxset_get_by_index(u->core->sinks, sink_index)))
+ if (!(sink = pa_idxset_get_by_index(u->core->sinks, sink_index))) {
+ pa_log("Could not find sink #%d", sink_index);
goto fail;
+ }
/* Read or create an entry */
name = pa_sprintf_malloc("sink:%s", sink->name);