diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-03-24 21:18:47 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-03-24 21:18:47 +0000 |
commit | 6d51e1f0e8aff9e485c04ece240c5764415e502a (patch) | |
tree | c8d973c2cbd3ca80d0ecf9427e8b6e0c80a9a61b /src | |
parent | 555a3202207c288fbfde9af5b568bcf234a5ac93 (diff) | |
download | libmicrohttpd-6d51e1f0e8aff9e485c04ece240c5764415e502a.tar.gz libmicrohttpd-6d51e1f0e8aff9e485c04ece240c5764415e502a.zip |
minor MHD_socket/int fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/examples/fileserver_example_external_select.c | 2 | ||||
-rw-r--r-- | src/microhttpd/response.c | 6 | ||||
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 2 | ||||
-rw-r--r-- | src/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 index 28d92303..1a91f719 100644 --- 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) | |||
109 | fd_set rs; | 109 | fd_set rs; |
110 | fd_set ws; | 110 | fd_set ws; |
111 | fd_set es; | 111 | fd_set es; |
112 | int max; | 112 | MHD_socket max; |
113 | MHD_UNSIGNED_LONG_LONG mhd_timeout; | 113 | MHD_UNSIGNED_LONG_LONG mhd_timeout; |
114 | 114 | ||
115 | if (argc != 3) | 115 | if (argc != 3) |
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index 180582f2..abaa64ca 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -241,7 +241,7 @@ MHD_create_response_from_callback (uint64_t size, | |||
241 | if (NULL == (response = malloc (sizeof (struct MHD_Response) + block_size))) | 241 | if (NULL == (response = malloc (sizeof (struct MHD_Response) + block_size))) |
242 | return NULL; | 242 | return NULL; |
243 | memset (response, 0, sizeof (struct MHD_Response)); | 243 | memset (response, 0, sizeof (struct MHD_Response)); |
244 | response->fd = MHD_INVALID_SOCKET; | 244 | response->fd = -1; |
245 | response->data = (void *) &response[1]; | 245 | response->data = (void *) &response[1]; |
246 | response->data_buffer_size = block_size; | 246 | response->data_buffer_size = block_size; |
247 | if (0 != pthread_mutex_init (&response->mutex, NULL)) | 247 | if (0 != pthread_mutex_init (&response->mutex, NULL)) |
@@ -296,7 +296,7 @@ free_callback (void *cls) | |||
296 | struct MHD_Response *response = cls; | 296 | struct MHD_Response *response = cls; |
297 | 297 | ||
298 | (void) close (response->fd); | 298 | (void) close (response->fd); |
299 | response->fd = MHD_INVALID_SOCKET; | 299 | response->fd = -1; |
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
@@ -380,7 +380,7 @@ MHD_create_response_from_data (size_t size, | |||
380 | if (NULL == (response = malloc (sizeof (struct MHD_Response)))) | 380 | if (NULL == (response = malloc (sizeof (struct MHD_Response)))) |
381 | return NULL; | 381 | return NULL; |
382 | memset (response, 0, sizeof (struct MHD_Response)); | 382 | memset (response, 0, sizeof (struct MHD_Response)); |
383 | response->fd = MHD_INVALID_SOCKET; | 383 | response->fd = -1; |
384 | if (0 != pthread_mutex_init (&response->mutex, NULL)) | 384 | if (0 != pthread_mutex_init (&response->mutex, NULL)) |
385 | { | 385 | { |
386 | free (response); | 386 | free (response); |
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index 454cb602..8f2797d0 100644 --- 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) | |||
62 | sa.sin_port = htons (DEAMON_TEST_PORT); | 62 | sa.sin_port = htons (DEAMON_TEST_PORT); |
63 | sa.sin_addr.s_addr = htonl (INADDR_LOOPBACK); | 63 | sa.sin_addr.s_addr = htonl (INADDR_LOOPBACK); |
64 | 64 | ||
65 | gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) (long) sd); | 65 | gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd); |
66 | 66 | ||
67 | ret = connect (sd, &sa, sizeof (struct sockaddr_in)); | 67 | ret = connect (sd, &sa, sizeof (struct sockaddr_in)); |
68 | 68 | ||
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index 4f7e0f6b..bf3e5a2a 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -301,7 +301,7 @@ testExternalPut () | |||
301 | fd_set rs; | 301 | fd_set rs; |
302 | fd_set ws; | 302 | fd_set ws; |
303 | fd_set es; | 303 | fd_set es; |
304 | int max; | 304 | MHD_socket max; |
305 | int running; | 305 | int running; |
306 | struct CURLMsg *msg; | 306 | struct CURLMsg *msg; |
307 | time_t start; | 307 | time_t start; |