aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-01 22:10:38 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-01 22:12:24 +0300
commit8aa7d23219052cde065b93adf04c5ded067a1fea (patch)
treefbf947885f56dd3f3da17a330c39178291ad53a7 /doc
parent08ea0cc894bfdd9aeddeb8bb113514c247d2c69e (diff)
downloadlibmicrohttpd-8aa7d23219052cde065b93adf04c5ded067a1fea.tar.gz
libmicrohttpd-8aa7d23219052cde065b93adf04c5ded067a1fea.zip
Partial revert of 1b610e5b13b7b96e7b3f372c8da1ec9d840f896a.
Implemented new functions for key and value with binary zero. Significantly speedup search for key by using key size.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/logging.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/doc/examples/logging.c b/doc/examples/logging.c
index a88f461e..239fbe7d 100644
--- a/doc/examples/logging.c
+++ b/doc/examples/logging.c
@@ -15,16 +15,11 @@
15 15
16 16
17static int 17static int
18print_out_key (void *cls, 18print_out_key (void *cls, enum MHD_ValueKind kind, const char *key,
19 enum MHD_ValueKind kind, 19 const char *value)
20 const char *key,
21 const char *value,
22 size_t value_size)
23{ 20{
24 (void) cls; /* Unused. Silent compiler warning. */ 21 (void)cls; /* Unused. Silent compiler warning. */
25 (void) kind; /* Unused. Silent compiler warning. */ 22 (void)kind; /* Unused. Silent compiler warning. */
26 (void) value_size;
27
28 printf ("%s: %s\n", key, value); 23 printf ("%s: %s\n", key, value);
29 return MHD_YES; 24 return MHD_YES;
30} 25}
@@ -43,9 +38,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
43 (void)con_cls; /* Unused. Silent compiler warning. */ 38 (void)con_cls; /* Unused. Silent compiler warning. */
44 printf ("New %s request for %s using version %s\n", method, url, version); 39 printf ("New %s request for %s using version %s\n", method, url, version);
45 40
46 MHD_get_connection_values (connection, 41 MHD_get_connection_values (connection, MHD_HEADER_KIND, print_out_key,
47 MHD_HEADER_KIND,
48 &print_out_key,
49 NULL); 42 NULL);
50 43
51 return MHD_NO; 44 return MHD_NO;