mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0689: when using getaddrinfo() the error message is unclear
Problem: When using getaddrinfo() the error message is unclear. Solution: Use gai_strerror() to get the message. (Ozaki Kiichi, closes #6034)
This commit is contained in:
parent
647a530b33
commit
a38b2b737e
@ -955,6 +955,7 @@ channel_open(
|
|||||||
int sd = -1;
|
int sd = -1;
|
||||||
channel_T *channel = NULL;
|
channel_T *channel = NULL;
|
||||||
#ifdef FEAT_IPV6
|
#ifdef FEAT_IPV6
|
||||||
|
int err;
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
struct addrinfo *res = NULL;
|
struct addrinfo *res = NULL;
|
||||||
struct addrinfo *addr = NULL;
|
struct addrinfo *addr = NULL;
|
||||||
@ -986,10 +987,11 @@ channel_open(
|
|||||||
// Set port number manually in order to prevent name resolution services
|
// Set port number manually in order to prevent name resolution services
|
||||||
// from being invoked in the environment where AI_NUMERICSERV is not
|
// from being invoked in the environment where AI_NUMERICSERV is not
|
||||||
// defined.
|
// defined.
|
||||||
if (getaddrinfo(hostname, NULL, &hints, &res) != 0)
|
if ((err = getaddrinfo(hostname, NULL, &hints, &res)) != 0)
|
||||||
{
|
{
|
||||||
ch_error(channel, "in getaddrinfo() in channel_open()");
|
ch_error(channel, "in getaddrinfo() in channel_open()");
|
||||||
PERROR(_("E901: getaddrinfo() in channel_open()"));
|
semsg(_("E901: getaddrinfo() in channel_open(): %s"),
|
||||||
|
gai_strerror(err));
|
||||||
channel_free(channel);
|
channel_free(channel);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
689,
|
||||||
/**/
|
/**/
|
||||||
688,
|
688,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user