Switch audiod over to the buffer tree API.
[paraslash.git] / http_recv.c
index b3b6210..ed362bf 100644 (file)
@@ -103,7 +103,7 @@ static void http_recv_pre_select(struct sched *s, struct task *t)
                para_fd_set(phd->fd, &s->rfds, &s->max_fileno);
 }
 
-#define HTTP_RECV_READ_BUF_SIZE 4096
+#define HTTP_RECV_READ_BUF_SIZE 16384
 
 static void http_recv_post_select(struct sched *s, struct task *t)
 {
@@ -186,7 +186,6 @@ static void http_recv_close(struct receiver_node *rn)
        close(phd->fd);
        free(rn->buf);
        free(rn->private_data);
-       http_recv_cmdline_parser_free(rn->conf);
 }
 
 static void *http_recv_parse_config(int argc, char **argv)
@@ -221,12 +220,17 @@ static int http_recv_open(struct receiver_node *rn)
        return 1;
 }
 
+static void http_recv_free_config(void *conf)
+{
+       http_recv_cmdline_parser_free(conf);
+}
+
 /**
- * the init function of the http receiver
+ * The init function of the http receiver.
  *
- * \param r pointer to the receiver struct to initialize
+ * \param r Pointer to the receiver struct to initialize.
  *
- * Just initialize all function pointers of \a r.
+ * This initializes all function pointers of \a r.
  */
 void http_recv_init(struct receiver *r)
 {
@@ -239,6 +243,7 @@ void http_recv_init(struct receiver *r)
        r->post_select = http_recv_post_select;
        r->shutdown = http_shutdown;
        r->parse_config = http_recv_parse_config;
+       r->free_config = http_recv_free_config;
        r->help = (struct ggo_help) {
                .short_help = http_recv_args_info_help,
                .detailed_help = http_recv_args_info_detailed_help