Patch 8.2.0689
Problem: When using getaddrinfo() the error message is unclear.
Solution: Use gai_strerror() to get the message. (Ozaki Kiichi,
closes #6034)
Files: src/channel.c
*** ../vim-8.2.0688/src/channel.c 2020-04-18 18:24:13.110776118 +0200
--- src/channel.c 2020-05-03 16:59:10.058467912 +0200
***************
*** 955,960 ****
--- 955,961 ----
int sd = -1;
channel_T *channel = NULL;
#ifdef FEAT_IPV6
+ int err;
struct addrinfo hints;
struct addrinfo *res = NULL;
struct addrinfo *addr = NULL;
***************
*** 986,995 ****
// Set port number manually in order to prevent name resolution services
// from being invoked in the environment where AI_NUMERICSERV is not
// defined.
! if (getaddrinfo(hostname, NULL, &hints, &res) != 0)
{
ch_error(channel, "in getaddrinfo() in channel_open()");
! PERROR(_("E901: getaddrinfo() in channel_open()"));
channel_free(channel);
return NULL;
}
--- 987,997 ----
// Set port number manually in order to prevent name resolution services
// from being invoked in the environment where AI_NUMERICSERV is not
// defined.
! if ((err = getaddrinfo(hostname, NULL, &hints, &res)) != 0)
{
ch_error(channel, "in getaddrinfo() in channel_open()");
! semsg(_("E901: getaddrinfo() in channel_open(): %s"),
! gai_strerror(err));
channel_free(channel);
return NULL;
}
*** ../vim-8.2.0688/src/version.c 2020-05-03 17:01:19.846024252 +0200
--- src/version.c 2020-05-03 17:03:02.829670443 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 689,
/**/
--
Don't believe everything you hear or anything you say.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///