diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-08 23:36:41 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-08 23:36:41 +0200 |
commit | de872dea2d88f183c3f434c694acdcdb373f639c (patch) | |
tree | fb9084eb931c9789060e65ee3be3dc5adcb30e73 /src/testcurl/https/test_https_session_info.c | |
parent | 6347f514aa2388e774d5bf356df8046864e5f73c (diff) | |
download | libmicrohttpd-de872dea2d88f183c3f434c694acdcdb373f639c.tar.gz libmicrohttpd-de872dea2d88f183c3f434c694acdcdb373f639c.zip |
define and use 'enum MHD_Result'
Diffstat (limited to 'src/testcurl/https/test_https_session_info.c')
-rw-r--r-- | src/testcurl/https/test_https_session_info.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index e961edc4..f8b37cff 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -41,14 +41,15 @@ struct MHD_Daemon *d; | |||
41 | * HTTP access handler call back | 41 | * HTTP access handler call back |
42 | * used to query negotiated security parameters | 42 | * used to query negotiated security parameters |
43 | */ | 43 | */ |
44 | static int | 44 | static enum MHD_Result |
45 | query_session_ahc (void *cls, struct MHD_Connection *connection, | 45 | query_session_ahc (void *cls, struct MHD_Connection *connection, |
46 | const char *url, const char *method, | 46 | const char *url, const char *method, |
47 | const char *version, const char *upload_data, | 47 | const char *version, const char *upload_data, |
48 | size_t *upload_data_size, void **ptr) | 48 | size_t *upload_data_size, void **ptr) |
49 | { | 49 | { |
50 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
51 | int ret; | 51 | enum MHD_Result ret; |
52 | int gret; | ||
52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ | 53 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ |
53 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 54 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
54 | 55 | ||
@@ -59,11 +60,11 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
59 | } | 60 | } |
60 | 61 | ||
61 | if (GNUTLS_TLS1_1 != | 62 | if (GNUTLS_TLS1_1 != |
62 | (ret = MHD_get_connection_info | 63 | (gret = MHD_get_connection_info |
63 | (connection, | 64 | (connection, |
64 | MHD_CONNECTION_INFO_PROTOCOL)->protocol)) | 65 | MHD_CONNECTION_INFO_PROTOCOL)->protocol)) |
65 | { | 66 | { |
66 | if (GNUTLS_TLS1_2 == ret) | 67 | if (GNUTLS_TLS1_2 == gret) |
67 | { | 68 | { |
68 | /* as usual, TLS implementations sometimes don't | 69 | /* as usual, TLS implementations sometimes don't |
69 | quite do what was asked, just mildly complain... */ | 70 | quite do what was asked, just mildly complain... */ |
@@ -76,8 +77,8 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
76 | fprintf (stderr, | 77 | fprintf (stderr, |
77 | "Error: requested protocol mismatch (wanted %d, got %d)\n", | 78 | "Error: requested protocol mismatch (wanted %d, got %d)\n", |
78 | GNUTLS_TLS1_1, | 79 | GNUTLS_TLS1_1, |
79 | ret); | 80 | gret); |
80 | return -1; | 81 | return MHD_NO; |
81 | } | 82 | } |
82 | } | 83 | } |
83 | 84 | ||