summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2021-08-10 23:14:01 +0300
committerAzat Khuzhin <azat@libevent.org>2021-08-10 23:22:10 +0300
commit86292628e30bea51c0de0136a00837ca2bc8447c (patch)
tree104c3bd9c25801a5286836c3a5d6e3db152997ec /test
parentf446229b2206691eae7ec892e68b2a0d6ef61306 (diff)
downloadlibevent-86292628e30bea51c0de0136a00837ca2bc8447c.tar.gz
test: fix checking test args for http_parse_uri_test
Diffstat (limited to 'test')
-rw-r--r--test/regress_http.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/regress_http.c b/test/regress_http.c
index a9c990b2..c5e5de59 100644
--- a/test/regress_http.c
+++ b/test/regress_http.c
@@ -2932,12 +2932,14 @@ end:
}
static void
-http_parse_uri_test(void *ptr)
+http_parse_uri_test(void *arg)
{
int nonconform = 0, unixsock = 0;
int parse_flags = 0;
struct evhttp_uri *uri = NULL;
char url_tmp[4096];
+ struct basic_test_data *data = arg;
+ const char *setup_data = data ? data->setup_data : NULL;
#define URI_PARSE_FLAGS(uri, flags) \
evhttp_uri_parse_with_flags((uri), flags)
#define URI_PARSE(uri) \
@@ -2951,12 +2953,12 @@ http_parse_uri_test(void *ptr)
TT_FAIL(("\"%s\" != \"%s\"",ret,want)); \
} while(0)
- if (ptr) {
- if (strstr(ptr, "nc") != NULL) {
+ if (setup_data) {
+ if (strstr(setup_data, "nc") != NULL) {
nonconform = 1;
parse_flags |= EVHTTP_URI_NONCONFORMANT;
}
- if (strstr(ptr, "un") != NULL) {
+ if (strstr(setup_data, "un") != NULL) {
unixsock = 1;
parse_flags |= EVHTTP_URI_UNIX_SOCKET;
}