mirror of
https://github.com/curl/curl.git
synced 2026-07-27 23:53:06 +03:00
parent
4570c22c57
commit
db061571ef
6 changed files with 87 additions and 47 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue