diff options
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 88e8d909..8fae1c64 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -226,9 +226,9 @@ MHD_default_logger_ (void *cls, | |||
226 | const char *fm, | 226 | const char *fm, |
227 | va_list ap) | 227 | va_list ap) |
228 | { | 228 | { |
229 | vfprintf ((FILE*) cls, fm, ap); | 229 | vfprintf ((FILE *) cls, fm, ap); |
230 | #ifdef _DEBUG | 230 | #ifdef _DEBUG |
231 | fflush ((FILE*) cls); | 231 | fflush ((FILE *) cls); |
232 | #endif /* _DEBUG */ | 232 | #endif /* _DEBUG */ |
233 | } | 233 | } |
234 | 234 | ||
@@ -257,7 +257,7 @@ MHD_free (void *ptr) | |||
257 | * @param daemon handle to a daemon | 257 | * @param daemon handle to a daemon |
258 | * @return master daemon handle | 258 | * @return master daemon handle |
259 | */ | 259 | */ |
260 | static struct MHD_Daemon* | 260 | static struct MHD_Daemon * |
261 | MHD_get_master (struct MHD_Daemon *daemon) | 261 | MHD_get_master (struct MHD_Daemon *daemon) |
262 | { | 262 | { |
263 | while (NULL != daemon->master) | 263 | while (NULL != daemon->master) |
@@ -372,7 +372,7 @@ MHD_ip_addr_to_key (const struct sockaddr *addr, | |||
372 | /* IPv4 addresses */ | 372 | /* IPv4 addresses */ |
373 | if (sizeof (struct sockaddr_in) == addrlen) | 373 | if (sizeof (struct sockaddr_in) == addrlen) |
374 | { | 374 | { |
375 | const struct sockaddr_in *addr4 = (const struct sockaddr_in*) addr; | 375 | const struct sockaddr_in *addr4 = (const struct sockaddr_in *) addr; |
376 | 376 | ||
377 | key->family = AF_INET; | 377 | key->family = AF_INET; |
378 | memcpy (&key->addr.ipv4, | 378 | memcpy (&key->addr.ipv4, |
@@ -385,7 +385,7 @@ MHD_ip_addr_to_key (const struct sockaddr *addr, | |||
385 | /* IPv6 addresses */ | 385 | /* IPv6 addresses */ |
386 | if (sizeof (struct sockaddr_in6) == addrlen) | 386 | if (sizeof (struct sockaddr_in6) == addrlen) |
387 | { | 387 | { |
388 | const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6*) addr; | 388 | const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *) addr; |
389 | 389 | ||
390 | key->family = AF_INET6; | 390 | key->family = AF_INET6; |
391 | memcpy (&key->addr.ipv6, | 391 | memcpy (&key->addr.ipv6, |
@@ -1752,7 +1752,7 @@ thread_main_connection_upgrade (struct MHD_Connection *con) | |||
1752 | /* FIXME: does this check really needed? */ | 1752 | /* FIXME: does this check really needed? */ |
1753 | if (MHD_INVALID_SOCKET != max_fd) | 1753 | if (MHD_INVALID_SOCKET != max_fd) |
1754 | { | 1754 | { |
1755 | struct timeval*tvp; | 1755 | struct timeval *tvp; |
1756 | struct timeval tv; | 1756 | struct timeval tv; |
1757 | if (((con->tls_read_ready) && | 1757 | if (((con->tls_read_ready) && |
1758 | (urh->in_buffer_used < urh->in_buffer_size)) || | 1758 | (urh->in_buffer_used < urh->in_buffer_size)) || |
@@ -2579,9 +2579,9 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, | |||
2579 | const char prt1[] = "http/1.1"; /* Registered code for HTTP/1.1 */ | 2579 | const char prt1[] = "http/1.1"; /* Registered code for HTTP/1.1 */ |
2580 | const char prt2[] = "http/1.0"; /* Registered code for HTTP/1.0 */ | 2580 | const char prt2[] = "http/1.0"; /* Registered code for HTTP/1.0 */ |
2581 | 2581 | ||
2582 | prts[0].data = (void*) prt1; | 2582 | prts[0].data = (void *) prt1; |
2583 | prts[0].size = MHD_STATICSTR_LEN_ (prt1); | 2583 | prts[0].size = MHD_STATICSTR_LEN_ (prt1); |
2584 | prts[1].data = (void*) prt2; | 2584 | prts[1].data = (void *) prt2; |
2585 | prts[1].size = MHD_STATICSTR_LEN_ (prt2); | 2585 | prts[1].size = MHD_STATICSTR_LEN_ (prt2); |
2586 | if (GNUTLS_E_SUCCESS != | 2586 | if (GNUTLS_E_SUCCESS != |
2587 | gnutls_alpn_set_protocols (connection->tls_session, | 2587 | gnutls_alpn_set_protocols (connection->tls_session, |
@@ -6032,7 +6032,7 @@ parse_options_va (struct MHD_Daemon *daemon, | |||
6032 | break; | 6032 | break; |
6033 | case MHD_OPTION_ARRAY: | 6033 | case MHD_OPTION_ARRAY: |
6034 | daemon->num_opts--; /* Do not count MHD_OPTION_ARRAY */ | 6034 | daemon->num_opts--; /* Do not count MHD_OPTION_ARRAY */ |
6035 | oa = va_arg (ap, struct MHD_OptionItem*); | 6035 | oa = va_arg (ap, struct MHD_OptionItem *); |
6036 | i = 0; | 6036 | i = 0; |
6037 | while (MHD_OPTION_END != (opt = oa[i].option)) | 6037 | while (MHD_OPTION_END != (opt = oa[i].option)) |
6038 | { | 6038 | { |
@@ -6713,7 +6713,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6713 | if (0 > setsockopt (listen_fd, | 6713 | if (0 > setsockopt (listen_fd, |
6714 | SOL_SOCKET, | 6714 | SOL_SOCKET, |
6715 | SO_REUSEADDR, | 6715 | SO_REUSEADDR, |
6716 | (void*) &on, sizeof (on))) | 6716 | (void *) &on, sizeof (on))) |
6717 | { | 6717 | { |
6718 | #ifdef HAVE_MESSAGES | 6718 | #ifdef HAVE_MESSAGES |
6719 | MHD_DLOG (daemon, | 6719 | MHD_DLOG (daemon, |
@@ -6732,7 +6732,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6732 | if (0 > setsockopt (listen_fd, | 6732 | if (0 > setsockopt (listen_fd, |
6733 | SOL_SOCKET, | 6733 | SOL_SOCKET, |
6734 | SO_REUSEADDR, | 6734 | SO_REUSEADDR, |
6735 | (void*) &on, sizeof (on))) | 6735 | (void *) &on, sizeof (on))) |
6736 | { | 6736 | { |
6737 | #ifdef HAVE_MESSAGES | 6737 | #ifdef HAVE_MESSAGES |
6738 | MHD_DLOG (daemon, | 6738 | MHD_DLOG (daemon, |
@@ -6900,7 +6900,7 @@ MHD_start_daemon_va (unsigned int flags, | |||
6900 | if (0 != setsockopt (listen_fd, | 6900 | if (0 != setsockopt (listen_fd, |
6901 | IPPROTO_TCP, | 6901 | IPPROTO_TCP, |
6902 | TCP_FASTOPEN, | 6902 | TCP_FASTOPEN, |
6903 | (const void*) &daemon->fastopen_queue_size, | 6903 | (const void *) &daemon->fastopen_queue_size, |
6904 | sizeof (daemon->fastopen_queue_size))) | 6904 | sizeof (daemon->fastopen_queue_size))) |
6905 | { | 6905 | { |
6906 | #ifdef HAVE_MESSAGES | 6906 | #ifdef HAVE_MESSAGES |
@@ -8069,7 +8069,7 @@ gcry_w32_mutex_init (void **ppmtx) | |||
8069 | 8069 | ||
8070 | if (NULL == *ppmtx) | 8070 | if (NULL == *ppmtx) |
8071 | return ENOMEM; | 8071 | return ENOMEM; |
8072 | if (! MHD_mutex_init_ ((MHD_mutex_*) *ppmtx)) | 8072 | if (! MHD_mutex_init_ ((MHD_mutex_ *) *ppmtx)) |
8073 | { | 8073 | { |
8074 | free (*ppmtx); | 8074 | free (*ppmtx); |
8075 | *ppmtx = NULL; | 8075 | *ppmtx = NULL; |
@@ -8083,7 +8083,7 @@ gcry_w32_mutex_init (void **ppmtx) | |||
8083 | static int | 8083 | static int |
8084 | gcry_w32_mutex_destroy (void **ppmtx) | 8084 | gcry_w32_mutex_destroy (void **ppmtx) |
8085 | { | 8085 | { |
8086 | int res = (MHD_mutex_destroy_ ((MHD_mutex_*) *ppmtx)) ? 0 : EINVAL; | 8086 | int res = (MHD_mutex_destroy_ ((MHD_mutex_ *) *ppmtx)) ? 0 : EINVAL; |
8087 | free (*ppmtx); | 8087 | free (*ppmtx); |
8088 | return res; | 8088 | return res; |
8089 | } | 8089 | } |
@@ -8092,14 +8092,14 @@ gcry_w32_mutex_destroy (void **ppmtx) | |||
8092 | static int | 8092 | static int |
8093 | gcry_w32_mutex_lock (void **ppmtx) | 8093 | gcry_w32_mutex_lock (void **ppmtx) |
8094 | { | 8094 | { |
8095 | return MHD_mutex_lock_ ((MHD_mutex_*) *ppmtx) ? 0 : EINVAL; | 8095 | return MHD_mutex_lock_ ((MHD_mutex_ *) *ppmtx) ? 0 : EINVAL; |
8096 | } | 8096 | } |
8097 | 8097 | ||
8098 | 8098 | ||
8099 | static int | 8099 | static int |
8100 | gcry_w32_mutex_unlock (void **ppmtx) | 8100 | gcry_w32_mutex_unlock (void **ppmtx) |
8101 | { | 8101 | { |
8102 | return MHD_mutex_unlock_ ((MHD_mutex_*) *ppmtx) ? 0 : EINVAL; | 8102 | return MHD_mutex_unlock_ ((MHD_mutex_ *) *ppmtx) ? 0 : EINVAL; |
8103 | } | 8103 | } |
8104 | 8104 | ||
8105 | 8105 | ||