diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-26 22:13:45 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-10-26 22:13:45 +0300 |
commit | 9d9a9e4bce94c96ced9ec79651d6e5430302269a (patch) | |
tree | 46e0bbef671e7ec86c4be7f9bd12abf1bed1de52 /src/testcurl | |
parent | d46bdbc34e1e82e3dc58906286925a8a452f7278 (diff) | |
download | libmicrohttpd-9d9a9e4bce94c96ced9ec79651d6e5430302269a.tar.gz libmicrohttpd-9d9a9e4bce94c96ced9ec79651d6e5430302269a.zip |
test_add_conn: minor fixes and improvements
Diffstat (limited to 'src/testcurl')
-rw-r--r-- | src/testcurl/test_add_conn.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c index 68b568b7..db6e85fd 100644 --- a/src/testcurl/test_add_conn.c +++ b/src/testcurl/test_add_conn.c | |||
@@ -208,7 +208,8 @@ _externalErrorExit_func (const char *errDesc, const char *funcName, int lineNum) | |||
208 | if (0 < lineNum) | 208 | if (0 < lineNum) |
209 | fprintf (stderr, " at line %d", lineNum); | 209 | fprintf (stderr, " at line %d", lineNum); |
210 | 210 | ||
211 | fprintf (stderr, ".\nLast errno value: %d\n", (int) errno); | 211 | fprintf (stderr, ".\nLast errno value: %d (%s)\n", (int) errno, |
212 | strerror (errno)); | ||
212 | #ifdef MHD_WINSOCK_SOCKETS | 213 | #ifdef MHD_WINSOCK_SOCKETS |
213 | fprintf (stderr, "WSAGetLastError() value: %d\n", (int) WSAGetLastError ()); | 214 | fprintf (stderr, "WSAGetLastError() value: %d\n", (int) WSAGetLastError ()); |
214 | #endif /* MHD_WINSOCK_SOCKETS */ | 215 | #endif /* MHD_WINSOCK_SOCKETS */ |
@@ -700,7 +701,8 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
700 | | MHD_USE_ERROR_LOG, | 701 | | MHD_USE_ERROR_LOG, |
701 | *pport, NULL, NULL, | 702 | *pport, NULL, NULL, |
702 | &ahc_echo, "GET", | 703 | &ahc_echo, "GET", |
703 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, | 704 | MHD_OPTION_THREAD_POOL_SIZE, (unsigned |
705 | int) MHD_CPU_COUNT, | ||
704 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 706 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
705 | MHD_OPTION_END); | 707 | MHD_OPTION_END); |
706 | 708 | ||
@@ -1058,17 +1060,13 @@ main (int argc, char *const *argv) | |||
1058 | * Mostly useful when configured with '--enable-asserts. */ | 1060 | * Mostly useful when configured with '--enable-asserts. */ |
1059 | slow_reply = cleanup_test; | 1061 | slow_reply = cleanup_test; |
1060 | ignore_response_errors = cleanup_test; | 1062 | ignore_response_errors = cleanup_test; |
1061 | if (cleanup_test) | ||
1062 | response_timeout_val /= 5; | ||
1063 | if (0 == response_timeout_val) | ||
1064 | response_timeout_val = 1; | ||
1065 | #ifndef HAVE_PTHREAD_H | 1063 | #ifndef HAVE_PTHREAD_H |
1066 | if (cleanup_test) | 1064 | if (cleanup_test) |
1067 | return 77; /* Cannot run without threads */ | 1065 | return 77; /* Cannot run without threads */ |
1068 | #endif /* HAVE_PTHREAD_H */ | 1066 | #endif /* HAVE_PTHREAD_H */ |
1069 | verbose = ! has_param (argc, argv, "-q") || has_param (argc, argv, "--quiet"); | 1067 | verbose = ! has_param (argc, argv, "-q") || has_param (argc, argv, "--quiet"); |
1070 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 1068 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
1071 | return 2; | 1069 | return 99; |
1072 | /* Could be set to non-zero value to enforce using specific port | 1070 | /* Could be set to non-zero value to enforce using specific port |
1073 | * in the test */ | 1071 | * in the test */ |
1074 | global_port = 0; | 1072 | global_port = 0; |