X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_send.c;h=feb1a84233ee67ff03e537c97f14cc0d9abb44e8;hp=ccd441a2501d2b189a864e3f9f130cdd147bb9bb;hb=337d7784b0f8bc30b1fa9af56ace503acd97d40d;hpb=806fcbb5a8c00d6b8c1a228b9b4d6b6758f613ca;ds=sidebyside diff --git a/http_send.c b/http_send.c index ccd441a2..feb1a842 100644 --- a/http_send.c +++ b/http_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Andre Noll + * Copyright (C) 2005-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -8,6 +8,7 @@ #include #include +#include #include "para.h" #include "error.h" @@ -41,7 +42,9 @@ enum http_client_status { HTTP_INVALID_GET_REQUEST }; +/** For each connected client, a structure of this type is maintained. */ struct private_http_sender_data { + /** The current state of this client. */ enum http_client_status status; }; @@ -74,7 +77,8 @@ static void http_shutdown_clients(void) } static void http_send(long unsigned current_chunk, - __a_unused long unsigned chunks_sent, const char *buf, size_t len) + __a_unused long unsigned chunks_sent, const char *buf, size_t len, + const char *header_buf, size_t header_len) { struct sender_client *sc, *tmp; @@ -82,7 +86,8 @@ static void http_send(long unsigned current_chunk, struct private_http_sender_data *phsd = sc->private_data; if (phsd->status != HTTP_STREAMING) continue; - send_chunk(sc, hss, 0, current_chunk, buf, len); + send_chunk(sc, hss, 0, current_chunk, buf, len, header_buf, + header_len); } }