aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/logging.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-08-24 18:03:05 +0000
committerChristian Grothoff <christian@grothoff.org>2008-08-24 18:03:05 +0000
commit9181dd0a072670d61a2e6839f23d7e33165ca089 (patch)
tree88806884c43d3579c3a357d8b26d1843e009ceab /doc/examples/logging.c
parent484e65d76e26874485e906f5221156442bb52467 (diff)
downloadlibmicrohttpd-9181dd0a072670d61a2e6839f23d7e33165ca089.tar.gz
libmicrohttpd-9181dd0a072670d61a2e6839f23d7e33165ca089.zip
indenting
Diffstat (limited to 'doc/examples/logging.c')
-rw-r--r--doc/examples/logging.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/doc/examples/logging.c b/doc/examples/logging.c
index 213c12bf..d1dd4f1f 100644
--- a/doc/examples/logging.c
+++ b/doc/examples/logging.c
@@ -6,32 +6,39 @@
6#define PORT 8888 6#define PORT 8888
7 7
8 8
9int print_out_key (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) 9int
10print_out_key (void *cls, enum MHD_ValueKind kind, const char *key,
11 const char *value)
10{ 12{
11 printf ("%s = %s\n", key, value); 13 printf ("%s = %s\n", key, value);
12 return MHD_YES; 14 return MHD_YES;
13} 15}
14 16
15int answer_to_connection (void *cls, struct MHD_Connection *connection, const char *url, 17int
16 const char *method, const char *version, const char *upload_data, 18answer_to_connection (void *cls, struct MHD_Connection *connection,
17 unsigned int *upload_data_size, void **con_cls) 19 const char *url, const char *method,
20 const char *version, const char *upload_data,
21 unsigned int *upload_data_size, void **con_cls)
18{ 22{
19 printf ("New request %s for %s using version %s\n", method, url, version); 23 printf ("New request %s for %s using version %s\n", method, url, version);
20 24
21 MHD_get_connection_values (connection, MHD_HEADER_KIND, print_out_key, NULL); 25 MHD_get_connection_values (connection, MHD_HEADER_KIND, print_out_key,
26 NULL);
22 27
23 return MHD_NO; 28 return MHD_NO;
24} 29}
25 30
26int main () 31int
32main ()
27{ 33{
28 struct MHD_Daemon *daemon; 34 struct MHD_Daemon *daemon;
29 35
30 daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL, 36 daemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY, PORT, NULL, NULL,
31 &answer_to_connection, NULL, MHD_OPTION_END); 37 &answer_to_connection, NULL, MHD_OPTION_END);
32 if (NULL == daemon) return 1; 38 if (NULL == daemon)
39 return 1;
33 40
34 getchar (); 41 getchar ();
35 42
36 MHD_stop_daemon (daemon); 43 MHD_stop_daemon (daemon);
37 return 0; 44 return 0;