mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Revert "Network and IPv{4,6} related changes"
This commit is contained in:
parent
2d69deb0a3
commit
f5f3d7cc98
19 changed files with 241 additions and 88 deletions
|
|
@ -585,7 +585,7 @@ static LISTEN_REC *find_listen(const char *ircnet, int port)
|
|||
static void add_listen(const char *ircnet, int port)
|
||||
{
|
||||
LISTEN_REC *rec;
|
||||
IPADDR ip, *my_ip;
|
||||
IPADDR ip4, ip6, *my_ip;
|
||||
|
||||
if (port <= 0 || *ircnet == '\0')
|
||||
return;
|
||||
|
|
@ -593,13 +593,16 @@ static void add_listen(const char *ircnet, int port)
|
|||
/* bind to specific host/ip? */
|
||||
my_ip = NULL;
|
||||
if (*settings_get_str("irssiproxy_bind") != '\0') {
|
||||
if (net_gethostbyname(settings_get_str("irssiproxy_bind"), &ip) != 0) {
|
||||
if (net_gethostbyname(settings_get_str("irssiproxy_bind"),
|
||||
&ip4, &ip6) != 0) {
|
||||
printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||
"Proxy: can not resolve '%s' - aborting",
|
||||
settings_get_str("irssiproxy_bind"));
|
||||
return;
|
||||
}
|
||||
my_ip = &ip;
|
||||
|
||||
my_ip = ip6.family == 0 ? &ip4 : ip4.family == 0 ||
|
||||
settings_get_bool("resolve_prefer_ipv6") ? &ip6 : &ip4;
|
||||
}
|
||||
|
||||
rec = g_new0(LISTEN_REC, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue