[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32260 - in libmicrohttpd: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32260 - in libmicrohttpd: . src/microhttpd |
Date: |
Sat, 8 Feb 2014 15:09:04 +0100 |
Author: grothoff
Date: 2014-02-08 15:09:04 +0100 (Sat, 08 Feb 2014)
New Revision: 32260
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/microhttpd/connection.c
libmicrohttpd/src/microhttpd/digestauth.c
libmicrohttpd/src/microhttpd/internal.h
Log:
size_t vs. int fixes by Evgeny Grin, plus some additional fixes by CG
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2014-02-08 14:02:05 UTC (rev 32259)
+++ libmicrohttpd/ChangeLog 2014-02-08 14:09:04 UTC (rev 32260)
@@ -1,3 +1,6 @@
+Sat Feb 8 15:08:35 CET 2014
+ Corrected some uses of 'int' vs. 'size_t'. -EG/CG
+
Wed Jan 22 09:44:33 CET 2014
MHD_USE_DUAL_STACK in libmicrohttpd currently just *inhibits
setting* the IPV6_V6ONLY socket option, but per Microsoft's
Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c 2014-02-08 14:02:05 UTC (rev
32259)
+++ libmicrohttpd/src/microhttpd/connection.c 2014-02-08 14:09:04 UTC (rev
32260)
@@ -396,7 +396,7 @@
struct MHD_Response *response;
size_t size;
char cbuf[10]; /* 10: max strlen of "%x\r\n" */
- int cblen;
+ size_t cblen;
response = connection->response;
if (0 == connection->write_buffer_size)
@@ -1491,7 +1491,7 @@
if (available > 0)
instant_retry = MHD_YES;
- if (connection->current_chunk_size == 0)
+ if (0 == connection->current_chunk_size)
{
connection->remaining_upload_size = 0;
break;
@@ -1625,7 +1625,7 @@
static int
do_write (struct MHD_Connection *connection)
{
- int ret;
+ ssize_t ret;
size_t max;
max = connection->write_buffer_append_offset -
connection->write_buffer_send_offset;
@@ -1643,7 +1643,7 @@
if (0 != (connection->daemon->options & MHD_USE_SSL))
MHD_DLOG (connection->daemon,
"Failed to send data: %s\n",
- gnutls_strerror (ret));
+ gnutls_strerror ((int) ret));
else
#endif
MHD_DLOG (connection->daemon,
@@ -1994,7 +1994,7 @@
MHD_connection_handle_write (struct MHD_Connection *connection)
{
struct MHD_Response *response;
- int ret;
+ ssize_t ret;
update_last_activity (connection);
while (1)
@@ -2035,7 +2035,7 @@
#if DEBUG_SEND_DATA
FPRINTF (stderr,
"Sent 100 continue response: `%.*s'\n",
- ret,
+ (int) ret,
&HTTP_100_CONTINUE[connection->continue_message_write_offset]);
#endif
connection->continue_message_write_offset += ret;
@@ -2072,7 +2072,7 @@
if (ret > 0)
FPRINTF (stderr,
"Sent DATA response: `%.*s'\n",
- ret,
+ (int) ret,
&response->data[connection->response_write_position -
response->data_start]);
#endif
Modified: libmicrohttpd/src/microhttpd/digestauth.c
===================================================================
--- libmicrohttpd/src/microhttpd/digestauth.c 2014-02-08 14:02:05 UTC (rev
32259)
+++ libmicrohttpd/src/microhttpd/digestauth.c 2014-02-08 14:09:04 UTC (rev
32260)
@@ -201,7 +201,7 @@
* @param key key to look up in data
* @return size of the located value, 0 if otherwise
*/
-static int
+static size_t
lookup_sub_value (char *dest,
size_t size,
const char *data,
@@ -381,7 +381,7 @@
* @param nonce_time The amount of time in seconds for a nonce to be invalid
* @param method HTTP method
* @param rnd A pointer to a character array for the random seed
- * @param rnd_size The size of the random seed array
+ * @param rnd_size The size of the random seed array @a rnd
* @param uri HTTP URI (in MHD, without the arguments ("?k=v")
* @param realm A string of characters that describes the realm of auth.
* @param nonce A pointer to a character array for the nonce to put in
@@ -390,7 +390,7 @@
calculate_nonce (uint32_t nonce_time,
const char *method,
const char *rnd,
- unsigned int rnd_size,
+ size_t rnd_size,
const char *uri,
const char *realm,
char *nonce)
@@ -407,14 +407,14 @@
timestamp[3] = (nonce_time & 0x000000ff);
MD5Update (&md5, timestamp, 4);
MD5Update (&md5, ":", 1);
- MD5Update (&md5, method, strlen(method));
+ MD5Update (&md5, method, strlen (method));
MD5Update (&md5, ":", 1);
if (rnd_size > 0)
MD5Update (&md5, rnd, rnd_size);
MD5Update (&md5, ":", 1);
- MD5Update (&md5, uri, strlen(uri));
+ MD5Update (&md5, uri, strlen (uri));
MD5Update (&md5, ":", 1);
- MD5Update (&md5, realm, strlen(realm));
+ MD5Update (&md5, realm, strlen (realm));
MD5Final (tmpnonce, &md5);
cvthex (tmpnonce, sizeof (tmpnonce), nonce);
cvthex (timestamp, 4, timestamphex);
@@ -429,8 +429,8 @@
* @param connection the connection
* @param key the key
* @param value the value, can be NULL
- * @return MHD_YES if the key-value pair is in the headers,
- * MHD_NO if not
+ * @return #MHD_YES if the key-value pair is in the headers,
+ * #MHD_NO if not
*/
static int
test_header (struct MHD_Connection *connection,
Modified: libmicrohttpd/src/microhttpd/internal.h
===================================================================
--- libmicrohttpd/src/microhttpd/internal.h 2014-02-08 14:02:05 UTC (rev
32259)
+++ libmicrohttpd/src/microhttpd/internal.h 2014-02-08 14:09:04 UTC (rev
32260)
@@ -782,13 +782,13 @@
* otherwise, this is the size of the current chunk. A value of
* zero is also used when we're at the end of the chunks.
*/
- unsigned int current_chunk_size;
+ size_t current_chunk_size;
/**
* If we are receiving with chunked encoding, where are we currently
* with respect to the current chunk (at what offset / position)?
*/
- unsigned int current_chunk_offset;
+ size_t current_chunk_offset;
/**
* Handler used for processing read connection operations
@@ -1217,7 +1217,7 @@
/**
* Size of `digest_auth_random.
*/
- unsigned int digest_auth_rand_size;
+ size_t digest_auth_rand_size;
/**
* Size of the nonce-nc array.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32260 - in libmicrohttpd: . src/microhttpd,
gnunet <=