Merge branch 'master' into next
[paraslash.git] / http_send.c
index ccd441a2501d2b189a864e3f9f130cdd147bb9bb..3959cad4f3b67326d6161a252c5b3a66a74e0394 100644 (file)
@@ -1,13 +1,15 @@
 /*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
 /** \file http_send.c paraslash's http sender */
 
+#include <regex.h>
 #include <sys/types.h>
 #include <dirent.h>
+#include <osl.h>
 
 #include "para.h"
 #include "error.h"
@@ -41,7 +43,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 +78,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 +87,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);
        }
 }