diff options
Diffstat (limited to 'src/microhttpd/test_options.c')
-rw-r--r-- | src/microhttpd/test_options.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/microhttpd/test_options.c b/src/microhttpd/test_options.c index 655ca828..deff9b92 100644 --- a/src/microhttpd/test_options.c +++ b/src/microhttpd/test_options.c | |||
@@ -28,13 +28,6 @@ | |||
28 | #include "microhttpd.h" | 28 | #include "microhttpd.h" |
29 | #include "mhd_sockets.h" | 29 | #include "mhd_sockets.h" |
30 | 30 | ||
31 | #define MHD_E_MEM "Error: memory error\n" | ||
32 | #define MHD_E_SERVER_INIT "Error: failed to start server\n" | ||
33 | |||
34 | const int DEBUG_GNUTLS_LOG_LEVEL = 0; | ||
35 | const char *test_file_name = "https_test_file"; | ||
36 | const char test_file_data[] = "Hello World\n"; | ||
37 | |||
38 | static enum MHD_Result | 31 | static enum MHD_Result |
39 | ahc_echo (void *cls, | 32 | ahc_echo (void *cls, |
40 | struct MHD_Connection *connection, | 33 | struct MHD_Connection *connection, |
@@ -57,10 +50,10 @@ ahc_echo (void *cls, | |||
57 | } | 50 | } |
58 | 51 | ||
59 | 52 | ||
60 | static int | 53 | static unsigned int |
61 | test_wrap_loc (char *test_name, int (*test)(void)) | 54 | test_wrap_loc (const char *test_name, unsigned int (*test)(void)) |
62 | { | 55 | { |
63 | int ret; | 56 | unsigned int ret; |
64 | 57 | ||
65 | fprintf (stdout, "running test: %s ", test_name); | 58 | fprintf (stdout, "running test: %s ", test_name); |
66 | ret = test (); | 59 | ret = test (); |
@@ -79,8 +72,8 @@ test_wrap_loc (char *test_name, int (*test)(void)) | |||
79 | /** | 72 | /** |
80 | * Test daemon initialization with the MHD_OPTION_SOCK_ADDR option | 73 | * Test daemon initialization with the MHD_OPTION_SOCK_ADDR option |
81 | */ | 74 | */ |
82 | static int | 75 | static unsigned int |
83 | test_ip_addr_option () | 76 | test_ip_addr_option (void) |
84 | { | 77 | { |
85 | struct MHD_Daemon *d; | 78 | struct MHD_Daemon *d; |
86 | struct sockaddr_in daemon_ip_addr; | 79 | struct sockaddr_in daemon_ip_addr; |
@@ -105,7 +98,7 @@ test_ip_addr_option () | |||
105 | &daemon_ip_addr, MHD_OPTION_END); | 98 | &daemon_ip_addr, MHD_OPTION_END); |
106 | 99 | ||
107 | if (d == 0) | 100 | if (d == 0) |
108 | return -1; | 101 | return 1; |
109 | 102 | ||
110 | MHD_stop_daemon (d); | 103 | MHD_stop_daemon (d); |
111 | 104 | ||
@@ -115,7 +108,7 @@ test_ip_addr_option () | |||
115 | &daemon_ip_addr6, MHD_OPTION_END); | 108 | &daemon_ip_addr6, MHD_OPTION_END); |
116 | 109 | ||
117 | if (d == 0) | 110 | if (d == 0) |
118 | return -1; | 111 | return 1; |
119 | 112 | ||
120 | MHD_stop_daemon (d); | 113 | MHD_stop_daemon (d); |
121 | #endif | 114 | #endif |