aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/daemon/response.c4
-rw-r--r--src/examples/fileserver_example.c4
-rw-r--r--src/examples/fileserver_example_dirs.c8
-rw-r--r--src/examples/fileserver_example_external_select.c4
-rw-r--r--src/examples/https_fileserver_example.c4
-rw-r--r--src/examples/minimal_example_comet.c4
-rw-r--r--src/include/microhttpd.h6
-rw-r--r--src/testcurl/daemontest_get_chunked.c4
-rw-r--r--src/testzzuf/daemontest_get_chunked.c4
10 files changed, 25 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index db181856..026e5255 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1Tue Sep 21 15:12:41 CEST 2010
2 Use "size_t" for buffer size instead of "int". -CG
3
1Sat Sep 18 07:16:30 CEST 2010 4Sat Sep 18 07:16:30 CEST 2010
2 Adding support for SHOUTcast. -CG 5 Adding support for SHOUTcast. -CG
3 6
diff --git a/src/daemon/response.c b/src/daemon/response.c
index ae2b8615..6700bab1 100644
--- a/src/daemon/response.c
+++ b/src/daemon/response.c
@@ -216,8 +216,8 @@ MHD_create_response_from_callback (uint64_t size,
216 * @param max number of bytes to write at most 216 * @param max number of bytes to write at most
217 * @return number of bytes written 217 * @return number of bytes written
218 */ 218 */
219static int 219static ssize_t
220file_reader (void *cls, uint64_t pos, char *buf, int max) 220file_reader (void *cls, uint64_t pos, char *buf, size_t max)
221{ 221{
222 struct MHD_Response *response = cls; 222 struct MHD_Response *response = cls;
223 int ret; 223 int ret;
diff --git a/src/examples/fileserver_example.c b/src/examples/fileserver_example.c
index e2258063..f470a236 100644
--- a/src/examples/fileserver_example.c
+++ b/src/examples/fileserver_example.c
@@ -29,8 +29,8 @@
29 29
30#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>" 30#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>"
31 31
32static int 32static ssize_t
33file_reader (void *cls, uint64_t pos, char *buf, int max) 33file_reader (void *cls, uint64_t pos, char *buf, size_t max)
34{ 34{
35 FILE *file = cls; 35 FILE *file = cls;
36 36
diff --git a/src/examples/fileserver_example_dirs.c b/src/examples/fileserver_example_dirs.c
index 3bdb64ff..8c874994 100644
--- a/src/examples/fileserver_example_dirs.c
+++ b/src/examples/fileserver_example_dirs.c
@@ -30,8 +30,8 @@
30 30
31#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>" 31#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>"
32 32
33static int 33static ssize_t
34file_reader (void *cls, uint64_t pos, char *buf, int max) 34file_reader (void *cls, uint64_t pos, char *buf, size_t max)
35{ 35{
36 FILE *file = cls; 36 FILE *file = cls;
37 37
@@ -54,8 +54,8 @@ dir_free_callback (void *cls)
54 closedir (dir); 54 closedir (dir);
55} 55}
56 56
57static int 57static ssize_t
58dir_reader (void *cls, uint64_t pos, char *buf, int max) 58dir_reader (void *cls, uint64_t pos, char *buf, size_t max)
59{ 59{
60 DIR *dir = cls; 60 DIR *dir = cls;
61 struct dirent *e; 61 struct dirent *e;
diff --git a/src/examples/fileserver_example_external_select.c b/src/examples/fileserver_example_external_select.c
index 76e40c7a..aabe1d96 100644
--- a/src/examples/fileserver_example_external_select.c
+++ b/src/examples/fileserver_example_external_select.c
@@ -29,8 +29,8 @@
29 29
30#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>" 30#define PAGE "<html><head><title>File not found</title></head><body>File not found</body></html>"
31 31
32static int 32static ssize_t
33file_reader (void *cls, uint64_t pos, char *buf, int max) 33file_reader (void *cls, uint64_t pos, char *buf, size_t max)
34{ 34{
35 FILE *file = cls; 35 FILE *file = cls;
36 36
diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c
index 4df9e359..fe1512ed 100644
--- a/src/examples/https_fileserver_example.c
+++ b/src/examples/https_fileserver_example.c
@@ -95,8 +95,8 @@ const char key_pem[] =
95 "eRJ6DxULPxABytJrYCRrNqmXi5TCiqR2mtfalEMOPxz8rUU8dYyx\n" 95 "eRJ6DxULPxABytJrYCRrNqmXi5TCiqR2mtfalEMOPxz8rUU8dYyx\n"
96 "-----END RSA PRIVATE KEY-----\n"; 96 "-----END RSA PRIVATE KEY-----\n";
97 97
98static int 98static ssize_t
99file_reader (void *cls, uint64_t pos, char *buf, int max) 99file_reader (void *cls, uint64_t pos, char *buf, size_t max)
100{ 100{
101 FILE *file = cls; 101 FILE *file = cls;
102 102
diff --git a/src/examples/minimal_example_comet.c b/src/examples/minimal_example_comet.c
index 4aeb5db6..9b25889e 100644
--- a/src/examples/minimal_example_comet.c
+++ b/src/examples/minimal_example_comet.c
@@ -25,8 +25,8 @@
25#include "platform.h" 25#include "platform.h"
26#include <microhttpd.h> 26#include <microhttpd.h>
27 27
28static int 28static ssize_t
29data_generator (void *cls, uint64_t pos, char *buf, int max) 29data_generator (void *cls, uint64_t pos, char *buf, size_t max)
30{ 30{
31 if (max < 80) 31 if (max < 80)
32 return 0; 32 return 0;
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index fa01680a..2ba791b9 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -866,6 +866,8 @@ typedef int
866 * libmicrohttpd guarantees that "pos" will be 866 * libmicrohttpd guarantees that "pos" will be
867 * the sum of all non-negative return values 867 * the sum of all non-negative return values
868 * obtained from the content reader so far. 868 * obtained from the content reader so far.
869 * @param buf where to copy the data
870 * @param max maximum number of bytes to copy to buf (size of buf)
869 * @return -1 for the end of transmission (or on error); 871 * @return -1 for the end of transmission (or on error);
870 * if a content transfer size was pre-set and the callback 872 * if a content transfer size was pre-set and the callback
871 * has provided fewer than that amount of data, 873 * has provided fewer than that amount of data,
@@ -876,11 +878,11 @@ typedef int
876 * (possibly allowing the client to perform additional 878 * (possibly allowing the client to perform additional
877 * requests using the same TCP connection). 879 * requests using the same TCP connection).
878 */ 880 */
879typedef int 881typedef ssize_t
880 (*MHD_ContentReaderCallback) (void *cls, 882 (*MHD_ContentReaderCallback) (void *cls,
881 uint64_t pos, 883 uint64_t pos,
882 char *buf, 884 char *buf,
883 int max); 885 size_t max);
884 886
885/** 887/**
886 * This method is called by libmicrohttpd if we 888 * This method is called by libmicrohttpd if we
diff --git a/src/testcurl/daemontest_get_chunked.c b/src/testcurl/daemontest_get_chunked.c
index 6aef68ad..e5b1a73a 100644
--- a/src/testcurl/daemontest_get_chunked.c
+++ b/src/testcurl/daemontest_get_chunked.c
@@ -63,8 +63,8 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
63 * MHD content reader callback that returns 63 * MHD content reader callback that returns
64 * data in chunks. 64 * data in chunks.
65 */ 65 */
66static int 66static ssize_t
67crc (void *cls, uint64_t pos, char *buf, int max) 67crc (void *cls, uint64_t pos, char *buf, size_t max)
68{ 68{
69 struct MHD_Response **responseptr = cls; 69 struct MHD_Response **responseptr = cls;
70 70
diff --git a/src/testzzuf/daemontest_get_chunked.c b/src/testzzuf/daemontest_get_chunked.c
index 29ee5028..655f402a 100644
--- a/src/testzzuf/daemontest_get_chunked.c
+++ b/src/testzzuf/daemontest_get_chunked.c
@@ -61,8 +61,8 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
61 * MHD content reader callback that returns 61 * MHD content reader callback that returns
62 * data in chunks. 62 * data in chunks.
63 */ 63 */
64static int 64static ssize_t
65crc (void *cls, uint64_t pos, char *buf, int max) 65crc (void *cls, uint64_t pos, char *buf, size_t max)
66{ 66{
67 struct MHD_Response **responseptr = cls; 67 struct MHD_Response **responseptr = cls;
68 68