__noreturn static void interactive_session(void)
{
int ret;
- char *history_file;
struct sigaction act;
struct i9e_client_info ici = {
.fds = {0, 1, 2},
};
PARA_NOTICE_LOG("\n%s\n", version_text("audioc"));
- if (OPT_GIVEN(HISTORY_FILE))
- history_file = para_strdup(OPT_STRING_VAL(HISTORY_FILE));
- else {
- const char *home = get_homedir();
- history_file = make_message("%s/.paraslash/audioc.history",
- home);
- }
- ici.history_file = history_file;
-
+ ici.history_file = OPT_GIVEN(HISTORY_FILE)?
+ para_strdup(OPT_STRING_VAL(HISTORY_FILE)) :
+ make_message("%s/audioc.history", get_confdir());
act.sa_handler = i9e_signal_dispatch;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
i9e_close();
para_log = stderr_log;
out:
- free(history_file);
+ free(ici.history_file);
free(socket_name);
if (ret < 0)
PARA_ERROR_LOG("%s\n", para_strerror(-ret));