1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-05 19:15:32 +00:00

sip: origin: Do not use CallsNetworkWatch during tests

As local testing showed we might get netlink message headers of type
NLMSG_ERROR which leads to a warning being printed and the test to fail.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-09-03 00:20:44 +02:00
parent 876375a39b
commit 6b33845b11

View file

@ -1433,10 +1433,10 @@ calls_sip_origin_accounts_interface_init (CallsAccountInterface *iface)
static void
calls_sip_origin_init (CallsSipOrigin *self)
{
CallsNetworkWatch *nw = calls_network_watch_get_default ();
const char *sip_test_env = g_getenv ("CALLS_SIP_TEST");
if (nw)
g_signal_connect_swapped (nw, "network-changed",
if (!sip_test_env || sip_test_env[0] == '\0')
g_signal_connect_swapped (calls_network_watch_get_default (), "network-changed",
G_CALLBACK (on_network_changed), self);
self->call_handles = g_hash_table_new (NULL, NULL);