mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-05 08:01:19 +00:00
network-watch: Don't fail initialization when unable to fetch local IP
This would mean we're failing when Calls is started with all NICs not connected
or disabled. To make matters worse this would only be fixable by restarting
Calls.
(cherry picked from commit b5defda27f
)
This commit is contained in:
parent
d55b737fb9
commit
432c7fd0d2
1 changed files with 9 additions and 9 deletions
|
@ -396,7 +396,6 @@ calls_network_watch_initable_init (GInitable *initable,
|
|||
GError **error)
|
||||
{
|
||||
CallsNetworkWatch *self = CALLS_NETWORK_WATCH (initable);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
self->fd = socket (AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
if (self->fd == -1 && error) {
|
||||
|
@ -406,16 +405,17 @@ calls_network_watch_initable_init (GInitable *initable,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (fetch_ipv4 (self)) {
|
||||
ret = TRUE;
|
||||
if (fetch_ipv4 (self))
|
||||
self->ipv4 = g_strdup (self->tmp_addr);
|
||||
}
|
||||
if (fetch_ipv6 (self)) {
|
||||
ret = TRUE;
|
||||
self->ipv6 = g_strdup (self->tmp_addr);
|
||||
}
|
||||
else
|
||||
self->ipv4 = g_strdup ("127.0.0.1");
|
||||
|
||||
return ret;
|
||||
if (fetch_ipv6 (self))
|
||||
self->ipv6 = g_strdup (self->tmp_addr);
|
||||
else
|
||||
self->ipv6 = g_strdup ("::1");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue