libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 6d51e1f0e8aff9e485c04ece240c5764415e502a
parent 555a3202207c288fbfde9af5b568bcf234a5ac93
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 24 Mar 2014 21:18:47 +0000

minor MHD_socket/int fixes

Diffstat:
Msrc/examples/fileserver_example_external_select.c | 2+-
Msrc/microhttpd/response.c | 6+++---
Msrc/testcurl/https/test_https_time_out.c | 2+-
Msrc/testcurl/test_put.c | 2+-
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/examples/fileserver_example_external_select.c b/src/examples/fileserver_example_external_select.c @@ -109,7 +109,7 @@ main (int argc, char *const *argv) fd_set rs; fd_set ws; fd_set es; - int max; + MHD_socket max; MHD_UNSIGNED_LONG_LONG mhd_timeout; if (argc != 3) diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -241,7 +241,7 @@ MHD_create_response_from_callback (uint64_t size, if (NULL == (response = malloc (sizeof (struct MHD_Response) + block_size))) return NULL; memset (response, 0, sizeof (struct MHD_Response)); - response->fd = MHD_INVALID_SOCKET; + response->fd = -1; response->data = (void *) &response[1]; response->data_buffer_size = block_size; if (0 != pthread_mutex_init (&response->mutex, NULL)) @@ -296,7 +296,7 @@ free_callback (void *cls) struct MHD_Response *response = cls; (void) close (response->fd); - response->fd = MHD_INVALID_SOCKET; + response->fd = -1; } @@ -380,7 +380,7 @@ MHD_create_response_from_data (size_t size, if (NULL == (response = malloc (sizeof (struct MHD_Response)))) return NULL; memset (response, 0, sizeof (struct MHD_Response)); - response->fd = MHD_INVALID_SOCKET; + response->fd = -1; if (0 != pthread_mutex_init (&response->mutex, NULL)) { free (response); diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c @@ -62,7 +62,7 @@ test_tls_session_time_out (gnutls_session_t session) sa.sin_port = htons (DEAMON_TEST_PORT); sa.sin_addr.s_addr = htonl (INADDR_LOOPBACK); - gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) (long) sd); + gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd); ret = connect (sd, &sa, sizeof (struct sockaddr_in)); diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c @@ -301,7 +301,7 @@ testExternalPut () fd_set rs; fd_set ws; fd_set es; - int max; + MHD_socket max; int running; struct CURLMsg *msg; time_t start;