mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fix multiple entries for local IP in /etc/hosts prevents connecting, patch by eridius (Bug 167)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3697 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
124e79aeeb
commit
a38c7d1631
@ -142,8 +142,11 @@ static void server_init(IRC_SERVER_REC *server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Replace ':' with '_' in our own hostname (the same IPv6 problem) */
|
/* Replace ':' with '_' in our own hostname (the same IPv6 problem) */
|
||||||
|
/* Replace '\n' and '\r' with '\0' in our own hostname to fix multiple PTR addreses */
|
||||||
for (ptr = hostname; *ptr != '\0'; ptr++) {
|
for (ptr = hostname; *ptr != '\0'; ptr++) {
|
||||||
if (*ptr == ':') *ptr = '_';
|
if (*ptr == ':') *ptr = '_';
|
||||||
|
if (*ptr == '\n') *ptr = '\0';
|
||||||
|
if (*ptr == '\r') *ptr = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* don't allow hostname to begin with number or '+', '-'. those
|
/* don't allow hostname to begin with number or '+', '-'. those
|
||||||
|
Loading…
Reference in New Issue
Block a user