summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-08-08 23:13:57 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-08-09 12:26:02 +0200
commitdb061571ef4b7a925da1c189b60c08b39e6b2dbf (patch)
treea709e439ac1ef0ace78663a8ea4724d84c329a8a /tests/unit
parent4570c22c579cdfb293d890f034c7c4926967790e (diff)
downloadcurl-db061571ef4b7a925da1c189b60c08b39e6b2dbf.tar.gz
http3: make connection reuse work
Closes #4204
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/unit1607.c8
-rw-r--r--tests/unit/unit1609.c10
2 files changed, 5 insertions, 13 deletions
diff --git a/tests/unit/unit1607.c b/tests/unit/unit1607.c
index 6e40be707..458604229 100644
--- a/tests/unit/unit1607.c
+++ b/tests/unit/unit1607.c
@@ -25,10 +25,6 @@
#include "connect.h"
#include "share.h"
-/* retrieves ip address and port from a sockaddr structure.
- note it calls Curl_inet_ntop which sets errno on fail, not SOCKERRNO. */
-bool getaddressinfo(struct sockaddr *sa, char *addr, long *port);
-
#include "memdebug.h" /* LAST include file */
static void unit_stop(void)
@@ -154,8 +150,8 @@ UNITTEST_START
if(tests[i].address[j] == &skip)
continue;
- if(addr && !getaddressinfo(addr->ai_addr,
- ipaddress, &port)) {
+ if(addr && !Curl_addr2string(addr->ai_addr,
+ ipaddress, &port)) {
fprintf(stderr, "%s:%d tests[%d] failed. getaddressinfo failed.\n",
__FILE__, __LINE__, i);
problem = true;
diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c
index 8d9bc6526..d919c9ea9 100644
--- a/tests/unit/unit1609.c
+++ b/tests/unit/unit1609.c
@@ -25,10 +25,6 @@
#include "connect.h"
#include "share.h"
-/* retrieves ip address and port from a sockaddr structure.
- note it calls Curl_inet_ntop which sets errno on fail, not SOCKERRNO. */
-bool getaddressinfo(struct sockaddr *sa, char *addr, long *port);
-
#include "memdebug.h" /* LAST include file */
static void unit_stop(void)
@@ -154,9 +150,9 @@ UNITTEST_START
if(!addr && !tests[i].address[j])
break;
- if(addr && !getaddressinfo(addr->ai_addr,
- ipaddress, &port)) {
- fprintf(stderr, "%s:%d tests[%d] failed. getaddressinfo failed.\n",
+ if(addr && !Curl_addr2string(addr->ai_addr,
+ ipaddress, &port)) {
+ fprintf(stderr, "%s:%d tests[%d] failed. Curl_addr2string failed.\n",
__FILE__, __LINE__, i);
problem = true;
break;