First draft of the libosl patch series.
[paraslash.git] / http_send.c
index 3de313c..5b98bbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
  */
@@ -41,7 +41,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 +76,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 +85,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);
        }
 }
 
@@ -105,8 +109,7 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds)
                                        phsd->status = HTTP_INVALID_GET_REQUEST;
                                } else {
                                        phsd->status = HTTP_GOT_GET_REQUEST;
-                                       PARA_INFO_LOG("%s",
-                                               "received get request\n");
+                                       PARA_INFO_LOG("received get request\n");
                                }
                        }
                        break;