From 0601a3bf713a1f196927f7a381cce56ebbf8aa04 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 Jul 2011 20:43:02 +0000 Subject: fix nonce type --- ChangeLog | 5 +++++ src/daemon/digestauth.c | 4 ++-- src/daemon/internal.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a2c6bd0..07bf703e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jul 16 22:42:10 CEST 2011 + Change type of nonce to 'unsigned long int' to match return type + from 'strtoul'. Fixes ERANGE check which would have previously + failed. -CG + Wed Jul 13 09:26:17 CEST 2011 Fixing HTTP error status strings for certain high-numbered status codes. Added support for some more (non-standard) status codes. diff --git a/src/daemon/digestauth.c b/src/daemon/digestauth.c index 00612e35..29b81e28 100644 --- a/src/daemon/digestauth.c +++ b/src/daemon/digestauth.c @@ -297,7 +297,7 @@ lookup_sub_value(char *dest, static int check_nonce_nc (struct MHD_Connection *connection, const char *nonce, - unsigned int nc) + unsigned long int nc) { uint32_t off; uint32_t mod; @@ -461,7 +461,7 @@ MHD_digest_auth_check(struct MHD_Connection *connection, uint32_t nonce_time; uint32_t t; size_t left; /* number of characters left in 'header' for 'uri' */ - unsigned int nci; + unsigned long int nci; header = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, diff --git a/src/daemon/internal.h b/src/daemon/internal.h index fcacc523..0b5450e4 100644 --- a/src/daemon/internal.h +++ b/src/daemon/internal.h @@ -119,7 +119,7 @@ struct MHD_NonceNc * Nonce counter, a value that increases for each subsequent * request for the same nonce. */ - unsigned int nc; + unsigned long int nc; /** * Nonce value: -- cgit v1.2.3