mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:13:34 +03:00
cf-socket: make Curl_addr2string static
Move as sockaddr2string() into cf-socket.c where its only callers are. Mark as UNITTEST for unit1609. Move "struct Curl_sockaddr_ex" into sockaddr.h, so connect.h and cf-socket.h can be included without all the system headers needed. Closes #21946
This commit is contained in:
parent
7ec25148c0
commit
30c9c79cf8
11 changed files with 95 additions and 91 deletions
|
|
@ -23,7 +23,6 @@
|
|||
***************************************************************************/
|
||||
#include "unitcheck.h"
|
||||
#include "urldata.h"
|
||||
#include "connect.h"
|
||||
#include "curl_addrinfo.h"
|
||||
|
||||
static CURLcode t1607_setup(void)
|
||||
|
|
@ -146,8 +145,8 @@ static CURLcode test_unit1607(const char *arg)
|
|||
if(tests[i].address[j] == &skip)
|
||||
continue;
|
||||
|
||||
if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen,
|
||||
ipaddress, &port)) {
|
||||
if(addr && !sockaddr2string(addr->ai_addr, addr->ai_addrlen,
|
||||
ipaddress, &port)) {
|
||||
curl_mfprintf(stderr, "%s:%d tests[%zu] failed. "
|
||||
"getaddressinfo failed.\n",
|
||||
__FILE__, __LINE__, i);
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ static CURLcode test_unit1609(const char *arg)
|
|||
if(!addr && !tests[i].address[j])
|
||||
break;
|
||||
|
||||
if(addr && !Curl_addr2string(addr->ai_addr, addr->ai_addrlen,
|
||||
ipaddress, &port)) {
|
||||
if(addr && !sockaddr2string(addr->ai_addr, addr->ai_addrlen,
|
||||
ipaddress, &port)) {
|
||||
curl_mfprintf(stderr,
|
||||
"%s:%d tests[%zu] failed. Curl_addr2string failed.\n",
|
||||
__FILE__, __LINE__, i);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "cf-ip-happy.h"
|
||||
#include "multiif.h"
|
||||
#include "select.h"
|
||||
#include "sockaddr.h"
|
||||
#include "curl_addrinfo.h"
|
||||
#include "curl_trc.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue