X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=09b21ba95c73b976e753eac5da06ff5208ca16da;hp=64152ce09323bc9b458f38ff09272f94e949db38;hb=e83cbfdcc9f5671cab0b1dae5cb81b956d0ab5ce;hpb=d73a140ae7f77a18f858a66d1a354d106088c6ca diff --git a/audioc.c b/audioc.c index 64152ce0..09b21ba9 100644 --- a/audioc.c +++ b/audioc.c @@ -253,16 +253,15 @@ __noreturn static void print_completions(void) static char *configfile_exists(void) { - static char *config_file; + char *config_file; struct stat statbuf; + char *home = para_homedir(); - if (!config_file) { - char *home = para_homedir(); - config_file = make_message("%s/.paraslash/audioc.conf", home); - free(home); - } + config_file = make_message("%s/.paraslash/audioc.conf", home); + free(home); if (!stat(config_file, &statbuf)) return config_file; + free(config_file); return NULL; } @@ -272,10 +271,11 @@ static char *configfile_exists(void) * \param argc Usual argument count. * \param argv Usual argument vector. * - * It creates a temporary local socket in order to communicate with para_audiod. - * Authentication consists in sending a ucred buffer that contains the user id. + * It connects to the "well-known" local socket to communicate with + * para_audiod. Authentication is performed by sending a ucred buffer + * containing the user id to the local socket. * - * Any output received through the local socket is sent to stdout. + * Any data received from the socket is written to stdout. * * \return EXIT_SUCCESS or EXIT_FAILURE. *