X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_recv.c;h=13e9ede23d4d3cda0dcea71fbeef9dc0602dbd6f;hp=2e518b2063a8c81946b27d971ad80f5fca3c070e;hb=ad6c68022eea0b0962855a2120cf242446bf10b9;hpb=335730538150250f32c0df0b184fb494e2bb0df3 diff --git a/http_recv.c b/http_recv.c index 2e518b20..13e9ede2 100644 --- a/http_recv.c +++ b/http_recv.c @@ -1,11 +1,12 @@ /* - * Copyright (C) 2005-2008 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file http_recv.c paraslash's http receiver */ +#include #include #include @@ -14,6 +15,7 @@ #include "http.h" #include "list.h" #include "sched.h" +#include "ggo.h" #include "recv.h" #include "http_recv.cmdline.h" #include "net.h" @@ -119,7 +121,7 @@ static void http_recv_post_select(struct sched *s, struct task *t) if (!FD_ISSET(phd->fd, &s->rfds)) return; if (phd->status == HTTP_SENT_GET_REQUEST) { - t->error = recv_pattern(phd->fd, HTTP_OK_MSG, MAXLINE); + t->error = recv_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG)); if (t->error >= 0) { PARA_INFO_LOG("received ok msg, streaming\n"); phd->status = HTTP_STREAMING; @@ -189,10 +191,18 @@ static int http_recv_open(struct receiver_node *rn) */ void http_recv_init(struct receiver *r) { + struct http_recv_args_info dummy; + + http_recv_cmdline_parser_init(&dummy); r->open = http_recv_open; r->close = http_recv_close; r->pre_select = http_recv_pre_select; r->post_select = http_recv_post_select; r->shutdown = http_shutdown; r->parse_config = http_recv_parse_config; + r->help = (struct ggo_help) { + .short_help = http_recv_args_info_help, + .detailed_help = http_recv_args_info_detailed_help + }; + http_recv_cmdline_parser_free(&dummy); }