X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_recv.c;h=3a723299e78b241a9ac4f44a13caf91651f36b6a;hp=d49cf2a853b3043edc09e5e419632b7cce2da6be;hb=04c16387cc13317ded03ce478b131d94558f585f;hpb=bd28ec9a64884d70917c4fdea1a3a70c91758f83 diff --git a/http_recv.c b/http_recv.c index d49cf2a8..3a723299 100644 --- a/http_recv.c +++ b/http_recv.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2005 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2005 Andre Noll , see file COPYING. */ /** \file http_recv.c paraslash's http receiver */ @@ -30,7 +26,7 @@ /** * the possible states of a http receiver node * - * \sa receiver_node + * \sa \ref receiver_node. */ enum http_recv_status {HTTP_CONNECTED, HTTP_SENT_GET_REQUEST, HTTP_STREAMING}; @@ -46,7 +42,7 @@ struct private_http_recv_data { * It gets initialized to \p HTTP_CONNECTED by the open function of the * http receiver. * - * \sa receiver::open, receiver_node. + * \sa \ref receiver::open, \ref receiver_node. */ enum http_recv_status status; }; @@ -110,8 +106,10 @@ static int http_recv_post_select(struct sched *s, void *context) } if (phd->status == HTTP_SENT_GET_REQUEST) { ret = read_pattern(rn->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG), &s->rfds); - if (ret < 0) + if (ret < 0) { + PARA_ERROR_LOG("did not receive HTTP OK message\n"); goto out; + } if (ret == 0) return 0; PARA_INFO_LOG("received ok msg, streaming\n"); @@ -132,8 +130,10 @@ static int http_recv_post_select(struct sched *s, void *context) btr_add_output_pool(rn->btrp, num_bytes - iov[0].iov_len, btrn); } out: - if (ret < 0) + if (ret < 0) { + PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); btr_remove_node(&rn->btrn); + } return ret; } @@ -167,6 +167,7 @@ static int http_recv_open(struct receiver_node *rn) return 1; } +/** See \ref recv_init(). */ const struct receiver lsg_recv_cmd_com_http_user_data = { .open = http_recv_open, .close = http_recv_close,