{
int i, ret;
- mmd->dbt_change = -1; /* no change nec., set to new dbt num by com_cdt */
+ mmd->selector_change = -1; /* no change nec., set to new num by com_chs */
if (!conf.selector_given)
goto random;
for (i = 0; dblist[i].name; i++) {
return sockfd;
}
-static void handle_dbt_change(void)
+static void change_selector(void)
{
- int ret, old = mmd->selector_num, new = mmd->dbt_change;
+ int ret, old = mmd->selector_num, new = mmd->selector_change;
dblist[old].shutdown();
ret = dblist[new].init(&dblist[new]);
- mmd->dbt_change = -1; /* reset */
+ mmd->selector_change = -1; /* reset */
if (ret >= 0) {
mmd->selector_num = new;
return;
close_log(logfile); /* gets reopened if necessary by parse_config */
logfile = NULL;
parse_config(1); /* reopens log */
- mmd->dbt_change = mmd->selector_num; /* do not change selector */
- handle_dbt_change(); /* reload selector */
+ mmd->selector_change = mmd->selector_num; /* do not change selector.. */
+ change_selector(); /* .. just reload */
}
static void status_refresh(void)
err = errno;
//PARA_DEBUG_LOG("%s: select returned %i\n", __func__, ret);
mmd_lock();
- if (mmd->dbt_change >= 0)
- handle_dbt_change();
+ if (mmd->selector_change >= 0)
+ change_selector();
if (dblist[mmd->selector_num].post_select)
dblist[mmd->selector_num].post_select(&rfds, &wfds);
if (ret < 0 && err == EINTR)
pid_t server_pid;
/** a string that gets filled in by the current audio file selector */
char selector_info[MMD_INFO_SIZE];
-/** the number if the current database tool */
+/** the number if the current audio file selector */
int selector_num;
-/** commands set this to non-zero to request a database tool change */
- int dbt_change;
+/** commands set this to non-zero to change the current selector */
+ int selector_change;
/** used by the sender command */
struct sender_command_data sender_cmd_data;
};