]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - grab_client.c
Add execute mechanism to receiver nodes.
[paraslash.git] / grab_client.c
index 5b0688fc90aa078632f1e9633c641a28bb5ad9d6..2b8c8d3e3d8e947789aa32c049403204948c1dc9 100644 (file)
@@ -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,7 +140,7 @@ static void gc_activate(struct grab_client *gc, struct sched *s)
 /**
  * Activate inactive grab clients if possible.
  *
- * \param sched Needed to schedule the grab client task.
+ * \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
@@ -166,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)) {