X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audioc.c;h=3997001d13f3a66ac0b9c70d31771417b5acddfd;hp=0c0eea47985f7cd0343ea791709895b25c15d940;hb=b66dfd41e268e64b65d2990bdec3d3a7e119e234;hpb=d4b040af5e31260dbf71f4547484179f32be4746 diff --git a/audioc.c b/audioc.c index 0c0eea47..3997001d 100644 --- a/audioc.c +++ b/audioc.c @@ -128,9 +128,7 @@ static void audioc_post_select(struct sched *s, struct task *t) out: if (ret < 0) { free(buf); - btr_remove_node(at->btrn); - btr_free_node(at->btrn); - at->btrn = NULL; + btr_remove_node(&at->btrn); close(at->fd); } t->error = ret; @@ -271,10 +269,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. * @@ -340,7 +339,7 @@ int main(int argc, char *argv[]) size_t n = ret = recv_bin_buffer(fd, buf, bufsize); if (ret <= 0) break; - ret = write_all(STDOUT_FILENO, buf, &n); + ret = write_all(STDOUT_FILENO, buf, n); } while (ret >= 0); out: free(buf);