mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
libnm: merge branch 'bg/libnm-activation-stuck-rh1367752'
https://bugzilla.redhat.com/show_bug.cgi?id=1367752
(cherry picked from commit aae26ebed3)
This commit is contained in:
commit
d5b3bf8ee7
2 changed files with 22 additions and 5 deletions
|
|
@ -2179,6 +2179,10 @@ active_connection_state_cb (NMActiveConnection *active, GParamSpec *pspec, Activ
|
||||||
g_print (_("Connection successfully activated (D-Bus active path: %s)\n"),
|
g_print (_("Connection successfully activated (D-Bus active path: %s)\n"),
|
||||||
nm_object_get_path (NM_OBJECT (active)));
|
nm_object_get_path (NM_OBJECT (active)));
|
||||||
activate_connection_info_finish (info);
|
activate_connection_info_finish (info);
|
||||||
|
} else if (state == NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) {
|
||||||
|
g_string_printf (nmc->return_text, _("Error: Connection activation failed."));
|
||||||
|
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
|
||||||
|
activate_connection_info_finish (info);
|
||||||
} else if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) {
|
} else if (state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) {
|
||||||
/* activating master connection does not automatically activate any slaves, so their
|
/* activating master connection does not automatically activate any slaves, so their
|
||||||
* active connection state will not progress beyond ACTIVATING state.
|
* active connection state will not progress beyond ACTIVATING state.
|
||||||
|
|
|
||||||
|
|
@ -488,14 +488,29 @@ create_async_complete (GObject *object, NMObjectTypeAsyncData *async_data)
|
||||||
static void
|
static void
|
||||||
create_async_inited (GObject *object, GAsyncResult *result, gpointer user_data)
|
create_async_inited (GObject *object, GAsyncResult *result, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
||||||
|
NMObjectPrivate *odata_priv;
|
||||||
NMObjectTypeAsyncData *async_data = user_data;
|
NMObjectTypeAsyncData *async_data = user_data;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
ObjectCreatedData *odata;
|
||||||
|
|
||||||
NM_OBJECT_GET_PRIVATE (object)->inited = TRUE;
|
priv->inited = TRUE;
|
||||||
if (!g_async_initable_init_finish (G_ASYNC_INITABLE (object), result, &error)) {
|
if (!g_async_initable_init_finish (G_ASYNC_INITABLE (object), result, &error)) {
|
||||||
dbgmsg ("Could not create object for %s: %s",
|
dbgmsg ("Could not create object for %s: %s",
|
||||||
nm_object_get_path (NM_OBJECT (object)),
|
nm_object_get_path (NM_OBJECT (object)),
|
||||||
error->message);
|
error->message);
|
||||||
|
|
||||||
|
while (priv->waiters) {
|
||||||
|
odata = priv->waiters->data;
|
||||||
|
odata_priv = NM_OBJECT_GET_PRIVATE (odata->self);
|
||||||
|
|
||||||
|
priv->waiters = g_slist_remove (priv->waiters, odata);
|
||||||
|
if (!odata_priv->reload_error)
|
||||||
|
odata_priv->reload_error = g_error_copy (error);
|
||||||
|
odata_priv->reload_remaining--;
|
||||||
|
reload_complete (odata->self, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
g_clear_object (&object);
|
g_clear_object (&object);
|
||||||
}
|
}
|
||||||
|
|
@ -503,15 +518,13 @@ create_async_inited (GObject *object, GAsyncResult *result, gpointer user_data)
|
||||||
create_async_complete (object, async_data);
|
create_async_complete (object, async_data);
|
||||||
|
|
||||||
if (object) {
|
if (object) {
|
||||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
|
||||||
|
|
||||||
/* There are some object properties whose creation couldn't proceed
|
/* There are some object properties whose creation couldn't proceed
|
||||||
* because it depended on this object. */
|
* because it depended on this object. */
|
||||||
while (priv->waiters) {
|
while (priv->waiters) {
|
||||||
ObjectCreatedData *odata = priv->waiters->data;
|
odata = priv->waiters->data;
|
||||||
|
|
||||||
priv->waiters = g_slist_remove (priv->waiters, odata);
|
priv->waiters = g_slist_remove (priv->waiters, odata);
|
||||||
object_property_maybe_complete (odata);
|
object_property_maybe_complete (odata);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue