We need to block ourselves around the gtk_switch_set_active() call in
the error path, when we can't speak to the sharing dbus service, or we
end up in an endless loop since we're the ::state-set handler.
https://bugzilla.gnome.org/show_bug.cgi?id=739886
Gbp-Pq: Name 30_stack_overflow.patch
g_warning ("Failed to %s service %s: %s", state ? "enable" : "disable",
self->priv->service_name, error->message);
g_error_free (error);
+ g_signal_handlers_block_by_func (widget,
+ cc_sharing_networks_enable_network, self);
gtk_switch_set_active (widget, !state);
+ g_signal_handlers_unblock_by_func (widget,
+ cc_sharing_networks_enable_network, self);
}
cc_sharing_update_networks (self);