Rename struct audio format to audio_format_handler
[paraslash.git] / dccp_send.c
index 7fad4f7..855780e 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;
 }