mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
server_connect_own_ip_save(): fixed some nasty typos that could have
crashed irssi when using vhosts git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1395 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cd9c127aab
commit
6fda90e72b
@ -446,14 +446,14 @@ void server_connect_own_ip_save(SERVER_CONNECT_REC *conn,
|
|||||||
|
|
||||||
if (ip4 != NULL && ip4->family != 0) {
|
if (ip4 != NULL && ip4->family != 0) {
|
||||||
/* IPv4 address was found */
|
/* IPv4 address was found */
|
||||||
if (conn->own_ip4 != NULL)
|
if (conn->own_ip4 == NULL)
|
||||||
conn->own_ip4 = g_new0(IPADDR, 1);
|
conn->own_ip4 = g_new0(IPADDR, 1);
|
||||||
memcpy(conn->own_ip4, ip4, sizeof(IPADDR));
|
memcpy(conn->own_ip4, ip4, sizeof(IPADDR));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ip6 != NULL && ip6->family != 0) {
|
if (ip6 != NULL && ip6->family != 0) {
|
||||||
/* IPv6 address was found */
|
/* IPv6 address was found */
|
||||||
if (conn->own_ip6 != NULL)
|
if (conn->own_ip6 == NULL)
|
||||||
conn->own_ip6 = g_new0(IPADDR, 1);
|
conn->own_ip6 = g_new0(IPADDR, 1);
|
||||||
memcpy(conn->own_ip6, ip6, sizeof(IPADDR));
|
memcpy(conn->own_ip6, ip6, sizeof(IPADDR));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user