mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-21 23:50:08 +01:00
libnm-glib: fix calling callback when activating connection
Connections were not added to pending_activations resulting in callback not being called.
This commit is contained in:
parent
5aa3b6081b
commit
d91c68235d
1 changed files with 11 additions and 2 deletions
|
|
@ -675,6 +675,7 @@ nm_client_activate_connection (NMClient *client,
|
|||
NMClientActivateFn callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMClientPrivate *priv;
|
||||
ActivateInfo *info;
|
||||
|
||||
g_return_if_fail (NM_IS_CLIENT (client));
|
||||
|
|
@ -687,7 +688,10 @@ nm_client_activate_connection (NMClient *client,
|
|||
info->user_data = user_data;
|
||||
info->client = client;
|
||||
|
||||
org_freedesktop_NetworkManager_activate_connection_async (NM_CLIENT_GET_PRIVATE (client)->client_proxy,
|
||||
priv = NM_CLIENT_GET_PRIVATE (client);
|
||||
priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
|
||||
|
||||
org_freedesktop_NetworkManager_activate_connection_async (priv->client_proxy,
|
||||
nm_connection_get_path (connection),
|
||||
device ? nm_object_get_path (NM_OBJECT (device)) : "/",
|
||||
specific_object ? specific_object : "/",
|
||||
|
|
@ -743,6 +747,7 @@ nm_client_add_and_activate_connection (NMClient *client,
|
|||
NMClientAddActivateFn callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMClientPrivate *priv;
|
||||
ActivateInfo *info;
|
||||
GHashTable *hash = NULL;
|
||||
|
||||
|
|
@ -758,7 +763,11 @@ nm_client_add_and_activate_connection (NMClient *client,
|
|||
hash = nm_connection_to_hash (partial, NM_SETTING_HASH_FLAG_ALL);
|
||||
else
|
||||
hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
org_freedesktop_NetworkManager_add_and_activate_connection_async (NM_CLIENT_GET_PRIVATE (client)->client_proxy,
|
||||
|
||||
priv = NM_CLIENT_GET_PRIVATE (client);
|
||||
priv->pending_activations = g_slist_prepend (priv->pending_activations, info);
|
||||
|
||||
org_freedesktop_NetworkManager_add_and_activate_connection_async (priv->client_proxy,
|
||||
hash,
|
||||
nm_object_get_path (NM_OBJECT (device)),
|
||||
specific_object ? specific_object : "/",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue