]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
gui: Remove superfluous cmd_died.
[paraslash.git] / client_common.c
index 649a1b4fdf49579e653d7b6cd6d9c977524e6171..7bdb4738bab5feb15b4c7acb1180decb61ccfda5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1997-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -44,12 +44,12 @@ void client_disconnect(struct client_task *ct)
        if (ct->scc.fd >= 0)
                close(ct->scc.fd);
        free_argv(ct->features);
+       ct->features = NULL;
        sc_free(ct->scc.recv);
        ct->scc.recv = NULL;
        sc_free(ct->scc.send);
        ct->scc.send = NULL;
-       btr_free_node(ct->btrn);
-       ct->btrn = NULL;
+       btr_remove_node(&ct->btrn);
 }
 
 /**
@@ -334,7 +334,9 @@ static void client_post_select(struct sched *s, struct task *t)
        size_t n;
        char buf[CLIENT_BUFSIZE];
 
-       t->error = 0;
+       ret = task_get_notification(t);
+       if (ret < 0)
+               goto out;
        if (ct->scc.fd < 0)
                return;
        switch (ct->status) {
@@ -562,7 +564,7 @@ out:
                if (!ct->use_sideband && ret != -E_SERVER_EOF &&
                                ret != -E_BTR_EOF && ret != -E_EOF)
                        PARA_ERROR_LOG("%s\n", para_strerror(-t->error));
-               btr_remove_node(btrn);
+               btr_remove_node(&ct->btrn);
        }
 }