summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'options.c')
-rw-r--r--options.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/options.c b/options.c
index 0aa8f24..2169837 100644
--- a/options.c
+++ b/options.c
@@ -218,10 +218,14 @@ int options_parse(options_t* opt, int argc, char* argv[])
}
if(channel) {
- if(!strcmp(channel, "main"))
- opt->channel_ = CHAN_MAIN;
- else if(!strcmp(channel, "music"))
- opt->channel_ = CHAN_MUSIC;
+ if(!strcmp(channel, "main")) {
+ opt->channel_master_ = CHAN_MAIN;
+ opt->channel_standby_ = CHAN_MAIN;
+ }
+ else if(!strcmp(channel, "music")) {
+ opt->channel_master_ = CHAN_MUSIC;
+ opt->channel_standby_ = CHAN_MUSIC;
+ }
else {
free(channel);
return -4;
@@ -319,7 +323,8 @@ void options_default(options_t* opt)
/* switchctl */
opt->mode_ = MODE_MASTER;
- opt->channel_ = CHAN_MAIN;
+ opt->channel_master_ = CHAN_MAIN;
+ opt->channel_standby_ = CHAN_MAIN;
opt->conf_file_ = strdup("/etc/rhctl/switchctl.conf");
opt->switch_dev_ = strdup("/dev/audioswitch");
key_value_storage_init(&opt->alias_table_);