m-si-standard-link: log error message when link activation fails

This makes debugging easier if a link fails to activate.
This commit is contained in:
Julian Bouzas 2025-09-25 09:00:03 -04:00
parent 7b78078ed2
commit 5c6a72e3cf

View file

@ -195,12 +195,16 @@ on_link_activated (WpObject * proxy, GAsyncResult * res,
{
WpSiStandardLink *self = wp_transition_get_source_object (transition);
guint len = self->node_links ? self->node_links->len : 0;
g_autoptr (GError) error = NULL;
/* Count the number of failed and active links */
if (wp_object_activate_finish (proxy, res, NULL))
if (wp_object_activate_finish (proxy, res, &error)) {
self->n_active_links++;
else
} else {
self->n_failed_links++;
wp_info_object (self, "Failed to activate link %p: %s", proxy,
error->message);
}
/* Wait for all links to finish activation */
if (self->n_failed_links + self->n_active_links != len)