X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=grab_client.c;h=a800b70b2be4b4c0d4a9ff637768686ec2aa73e6;hp=de69f074efceb6869b61b76391b38077d0061662;hb=f652ce6afe7f6fd0e42814505234cbf4321a736e;hpb=85094cd802bdb606d4e2bf7ed66dec51db2a0953 diff --git a/grab_client.c b/grab_client.c index de69f074..a800b70b 100644 --- a/grab_client.c +++ b/grab_client.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2011 Andre Noll + * Copyright (C) 2006-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -76,7 +76,7 @@ static int gc_write(struct grab_client *gc, char *buf, size_t len) if (gc->mode == GM_SLOPPY) return len; } - ret = write_nonblock(gc->fd, buf, len); + ret = xwrite(gc->fd, buf, len); if (ret < 0) goto err; if (ret > 0) @@ -140,6 +140,8 @@ static void gc_activate(struct grab_client *gc, struct sched *s) /** * Activate inactive grab clients if possible. * + * \param s Needed to schedule the grab client task. + * * This is called from audiod.c when the current audio file changes. It loops * over all inactive grab clients and checks each grab client's configuration * to determine if the client in question wishes to grab the new stream. If @@ -164,9 +166,7 @@ void activate_grab_clients(struct sched *s) static int gc_close(struct grab_client *gc, int err) { - btr_remove_node(gc->btrn); - btr_free_node(gc->btrn); - gc->btrn = NULL; + btr_remove_node(&gc->btrn); PARA_INFO_LOG("closing gc: %s\n", para_strerror(-err)); list_move(&gc->node, &inactive_grab_client_list); if (err == -E_GC_WRITE || (gc->flags & GF_ONE_SHOT)) {