]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - send_common.c
Revert "Makefile: Fix compilation after header removal."
[paraslash.git] / send_common.c
index ea494d9a7b23f5ee87186917d11e883631ec9cbc..90242d5c9b5ccb125617004e16fbf9b64d5484f6 100644 (file)
  */
 void shutdown_client(struct sender_client *sc, struct sender_status *ss)
 {
-       PARA_INFO_LOG("shutting down %s on fd %d\n", sc->name, sc->fd);
-       free(sc->name);
        if (!process_is_command_handler()) {
+               PARA_INFO_LOG("shutting down %s on fd %d\n", sc->name, sc->fd);
                close(sc->fd);
                del_close_on_fork_list(sc->fd);
        }
+       free(sc->name);
        cq_destroy(sc->cq);
        list_del(&sc->node);
        free(sc->private_data);
@@ -136,9 +136,9 @@ void init_sender_status(struct sender_status *ss,
        }
        ss->default_port = default_port;
 
-       INIT_LIST_HEAD(&ss->client_list);
+       init_list_head(&ss->client_list);
        /* Initialize an access control list */
-       INIT_LIST_HEAD(&ss->acl);
+       init_list_head(&ss->acl);
        for (i = 0; i < lls_opt_given(acl_opt_result); i++) {
                const char *arg = lls_string_val(i, acl_opt_result);
                char addr[16];