]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - dccp_send.c
grab: use grab_client_cmdline_parser_string()
[paraslash.git] / dccp_send.c
index 7fad4f7d7acb4b150719f5453af5e2f3e987f1ee..855780e6cd6a691be9dbaf1200e2c40f8fda3872 100644 (file)
@@ -50,8 +50,8 @@ struct dccp_client {
        int header_sent;
 };
 
-static void dccp_pre_select(__a_unused struct audio_format *af, int *max_fileno, fd_set *rfds,
-               __a_unused fd_set *wfds)
+static void dccp_pre_select(__a_unused struct audio_format_handler *af,
+               int *max_fileno, fd_set *rfds, __a_unused fd_set *wfds)
 {
        if (listen_fd < 0)
                return;
@@ -59,8 +59,8 @@ static void dccp_pre_select(__a_unused struct audio_format *af, int *max_fileno,
        *max_fileno = PARA_MAX(*max_fileno, listen_fd);
 }
 
-static void dccp_post_select(__a_unused struct audio_format *af, fd_set *rfds,
-               __a_unused fd_set *wfds)
+static void dccp_post_select(__a_unused struct audio_format_handler *af,
+               fd_set *rfds, __a_unused fd_set *wfds)
 {
        struct dccp_client *dc;
        int ret;
@@ -133,7 +133,7 @@ err_out:
        return -E_DCCP_WRITE;
 }
 
-static void dccp_send(__a_unused struct audio_format *af,
+static void dccp_send(__a_unused struct audio_format_handler *af,
                long unsigned current_chunk,
                __a_unused long unsigned chunks_sent, const char *buf, size_t len)
 {
@@ -234,8 +234,9 @@ void dccp_send_init(struct sender *s)
        s->client_cmds[SENDER_DELETE] = NULL;
        self = s;
        ret = dccp_open();
-       if (ret < 0)
+       if (ret < 0) {
                PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
-       else
+               s->status = SENDER_OFF;
+       } else
                s->status = SENDER_ON;
 }