summary refs log tree commit diff
path: root/libnm
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-03-13 01:29:54 +0100
committerMichael Biebl <biebl@debian.org>2018-03-13 01:29:54 +0100
commit7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (patch)
treee48e88b177182607488bcfd2d2645dbc77276866 /libnm
parent50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff)
New upstream version 1.10.6 upstream/1.10.6
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-client.c20
-rw-r--r--libnm/nm-dbus-helpers.c2
-rw-r--r--libnm/nm-device-wifi.c2
-rw-r--r--libnm/nm-device.c8
-rw-r--r--libnm/nm-manager.c10
-rw-r--r--libnm/nm-object.c2
-rw-r--r--libnm/nm-remote-connection.c12
-rw-r--r--libnm/nm-remote-settings.c8
-rw-r--r--libnm/nm-secret-agent-old.c6
9 files changed, 70 insertions, 0 deletions
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index c5a6f1cf..4653b272 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -718,6 +718,8 @@ nm_client_check_connectivity_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_check_connectivity_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_manager_check_connectivity_async (NM_CLIENT_GET_PRIVATE (client)->manager,
 	                                     cancellable, check_connectivity_cb, simple);
 }
@@ -827,6 +829,8 @@ nm_client_save_hostname_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_save_hostname_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_remote_settings_save_hostname_async (NM_CLIENT_GET_PRIVATE (client)->settings,
 	                                        hostname,
 	                                        cancellable, save_hostname_cb, simple);
@@ -1114,6 +1118,8 @@ nm_client_activate_connection_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_activate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_manager_activate_connection_async (NM_CLIENT_GET_PRIVATE (client)->manager,
 	                                      connection, device, specific_object,
 	                                      cancellable, activate_cb, simple);
@@ -1219,6 +1225,8 @@ nm_client_add_and_activate_connection_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_add_and_activate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_manager_add_and_activate_connection_async (NM_CLIENT_GET_PRIVATE (client)->manager,
 	                                              partial, device, specific_object,
 	                                              cancellable, add_activate_cb, simple);
@@ -1322,6 +1330,8 @@ nm_client_deactivate_connection_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_deactivate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	if (!_nm_client_check_nm_running (client, NULL)) {
 		g_simple_async_result_set_op_res_gboolean (simple, TRUE);
@@ -1528,6 +1538,8 @@ nm_client_add_connection_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_add_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_remote_settings_add_connection_async (NM_CLIENT_GET_PRIVATE (client)->settings,
 	                                         connection, save_to_disk,
 	                                         cancellable, add_connection_cb, simple);
@@ -1653,6 +1665,8 @@ nm_client_load_connections_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_load_connections_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_remote_settings_load_connections_async (NM_CLIENT_GET_PRIVATE (client)->settings,
 	                                           filenames,
 	                                           cancellable, load_connections_cb, simple);
@@ -1765,6 +1779,8 @@ nm_client_reload_connections_async (NMClient *client,
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
 	                                    nm_client_reload_connections_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nm_remote_settings_reload_connections_async (NM_CLIENT_GET_PRIVATE (client)->settings,
 	                                             cancellable, reload_connections_cb, simple);
 }
@@ -1931,6 +1947,8 @@ nm_client_new_async (GCancellable *cancellable,
 	GSimpleAsyncResult *simple;
 
 	simple = g_simple_async_result_new (NULL, callback, user_data, nm_client_new_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	g_async_initable_new_async (NM_TYPE_CLIENT, G_PRIORITY_DEFAULT,
 	                            cancellable, client_inited, simple,
@@ -2564,6 +2582,8 @@ prepare_object_manager (NMClient *client,
 	init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 	init_data->result = g_simple_async_result_new (G_OBJECT (client), callback,
 	                                               user_data, init_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (init_data->result, cancellable);
 	g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
 
 	g_dbus_object_manager_client_new_for_bus (_nm_dbus_bus_type (),
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c
index f835b591..90818a14 100644
--- a/libnm/nm-dbus-helpers.c
+++ b/libnm/nm-dbus-helpers.c
@@ -74,6 +74,8 @@ _nm_dbus_new_connection_async (GCancellable *cancellable,
 	GSimpleAsyncResult *simple;
 
 	simple = g_simple_async_result_new (NULL, callback, user_data, _nm_dbus_new_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	g_bus_get (_nm_dbus_bus_type (),
 	           cancellable,
diff --git a/libnm/nm-device-wifi.c b/libnm/nm-device-wifi.c
index c85809dd..e4ea94e9 100644
--- a/libnm/nm-device-wifi.c
+++ b/libnm/nm-device-wifi.c
@@ -407,6 +407,8 @@ _device_wifi_request_scan_async (NMDeviceWifi *device,
 
 	simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data,
 	                                    nm_device_wifi_request_scan_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	/* If a scan is in progress, just return */
 	if (priv->scan_info) {
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 65afd078..ffdfca9c 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -2005,6 +2005,8 @@ nm_device_reapply_async (NMDevice *device,
 
 	simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data,
 	                                    nm_device_reapply_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_device_call_reapply (NM_DEVICE_GET_PRIVATE (device)->proxy,
 	                            dict, version_id, flags, cancellable,
@@ -2168,6 +2170,8 @@ nm_device_get_applied_connection_async  (NMDevice *device,
 
 	simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data,
 	                                    nm_device_get_applied_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_device_call_get_applied_connection (NM_DEVICE_GET_PRIVATE (device)->proxy,
 	                                           flags, cancellable,
@@ -2289,6 +2293,8 @@ nm_device_disconnect_async (NMDevice *device,
 
 	simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data,
 	                                    nm_device_disconnect_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_device_call_disconnect (NM_DEVICE_GET_PRIVATE (device)->proxy,
 	                               cancellable,
@@ -2390,6 +2396,8 @@ nm_device_delete_async (NMDevice *device,
 
 	simple = g_simple_async_result_new (G_OBJECT (device), callback, user_data,
 	                                    nm_device_delete_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_device_call_delete (NM_DEVICE_GET_PRIVATE (device)->proxy,
 	                           cancellable,
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index 54a951a6..5eeed668 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -672,6 +672,8 @@ nm_manager_check_connectivity_async (NMManager *manager,
 
 	simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data,
 	                                    nm_manager_check_connectivity_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nmdbus_manager_call_check_connectivity (priv->proxy,
 	                                        cancellable,
 	                                        check_connectivity_cb, simple);
@@ -955,6 +957,8 @@ nm_manager_activate_connection_async (NMManager *manager,
 	info->manager = manager;
 	info->simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data,
 	                                          nm_manager_activate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (info->simple, cancellable);
 	info->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 
 	c_list_link_tail (&priv->pending_activations, &info->lst);
@@ -1032,6 +1036,8 @@ nm_manager_add_and_activate_connection_async (NMManager *manager,
 	info->manager = manager;
 	info->simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data,
 	                                          nm_manager_add_and_activate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (info->simple, cancellable);
 	info->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 
 	c_list_link_tail (&priv->pending_activations, &info->lst);
@@ -1164,6 +1170,8 @@ nm_manager_deactivate_connection_async (NMManager *manager,
 
 	simple = g_simple_async_result_new (G_OBJECT (manager), callback, user_data,
 	                                    nm_manager_deactivate_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	path = nm_object_get_path (NM_OBJECT (active));
 	nmdbus_manager_call_deactivate_connection (NM_MANAGER_GET_PRIVATE (manager)->proxy,
@@ -1301,6 +1309,8 @@ init_async (GAsyncInitable *initable, int io_priority,
 	init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 	init_data->result = g_simple_async_result_new (G_OBJECT (initable), callback,
 	                                               user_data, init_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (init_data->result, cancellable);
 	g_simple_async_result_set_op_res_gboolean (init_data->result, TRUE);
 
 	nm_manager_parent_async_initable_iface->init_async (initable, io_priority, cancellable,
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index c5316880..82e519e6 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -1131,6 +1131,8 @@ init_async (GAsyncInitable *initable, int io_priority,
 	init_data = g_slice_new0 (NMObjectInitData);
 	init_data->object = self;
 	init_data->simple = g_simple_async_result_new (G_OBJECT (initable), callback, user_data, init_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (init_data->simple, cancellable);
 	init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 
 	interfaces = g_dbus_object_get_interfaces (priv->object);
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c
index 25fe3529..80bf179d 100644
--- a/libnm/nm-remote-connection.c
+++ b/libnm/nm-remote-connection.c
@@ -125,6 +125,8 @@ nm_remote_connection_update2 (NMRemoteConnection *connection,
 
 	simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data,
 	                                    nm_remote_connection_update2);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	if (!settings) {
 		g_variant_builder_init (&builder, NM_VARIANT_TYPE_CONNECTION);
@@ -266,6 +268,8 @@ nm_remote_connection_commit_changes_async (NMRemoteConnection *connection,
 
 	simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data,
 	                                    nm_remote_connection_commit_changes_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	g_variant_builder_init (&args, G_VARIANT_TYPE ("a{sv}"));
 	nmdbus_settings_connection_call_update2 (priv->proxy,
@@ -379,6 +383,8 @@ nm_remote_connection_save_async (NMRemoteConnection *connection,
 
 	simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data,
 	                                    nm_remote_connection_save_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nmdbus_settings_connection_call_save (priv->proxy, cancellable, save_cb, simple);
 }
 
@@ -479,6 +485,8 @@ nm_remote_connection_delete_async (NMRemoteConnection *connection,
 
 	simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data,
 	                                    nm_remote_connection_delete_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 	nmdbus_settings_connection_call_delete (priv->proxy, cancellable, delete_cb, simple);
 }
 
@@ -591,6 +599,8 @@ nm_remote_connection_get_secrets_async (NMRemoteConnection *connection,
 
 	simple = g_simple_async_result_new (G_OBJECT (connection), callback, user_data,
 	                                    nm_remote_connection_get_secrets_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_settings_connection_call_get_secrets (priv->proxy,
 	                                             setting_name,
@@ -832,6 +842,8 @@ init_async (GAsyncInitable *initable, int io_priority,
 	init_data->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
 	init_data->result = g_simple_async_result_new (G_OBJECT (initable), callback,
 	                                               user_data, init_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (init_data->result, cancellable);
 	init_data->initable = initable;
 	init_data->io_priority = io_priority;
 
diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c
index 4d846424..2339e872 100644
--- a/libnm/nm-remote-settings.c
+++ b/libnm/nm-remote-settings.c
@@ -315,6 +315,8 @@ nm_remote_settings_add_connection_async (NMRemoteSettings *settings,
 	info->self = settings;
 	info->simple = g_simple_async_result_new (G_OBJECT (settings), callback, user_data,
 	                                          nm_remote_settings_add_connection_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (info->simple, cancellable);
 	info->saved = save_to_disk;
 
 	new_settings = nm_connection_to_dbus (connection, NM_CONNECTION_SERIALIZE_ALL);
@@ -415,6 +417,8 @@ nm_remote_settings_load_connections_async (NMRemoteSettings *settings,
 
 	simple = g_simple_async_result_new (G_OBJECT (settings), callback, user_data,
 	                                    nm_remote_settings_load_connections_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_settings_call_load_connections (priv->proxy,
 	                                       (const char * const *) filenames,
@@ -497,6 +501,8 @@ nm_remote_settings_reload_connections_async (NMRemoteSettings *settings,
 
 	simple = g_simple_async_result_new (G_OBJECT (settings), callback, user_data,
 	                                    nm_remote_settings_reload_connections_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_settings_call_reload_connections (priv->proxy, cancellable,
 	                                         reload_connections_cb, simple);
@@ -574,6 +580,8 @@ nm_remote_settings_save_hostname_async (NMRemoteSettings *settings,
 
 	simple = g_simple_async_result_new (G_OBJECT (settings), callback, user_data,
 	                                    nm_remote_settings_save_hostname_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	nmdbus_settings_call_save_hostname (priv->proxy,
 	                                    hostname ? hostname : "",
diff --git a/libnm/nm-secret-agent-old.c b/libnm/nm-secret-agent-old.c
index c9dbb4ff..d5f6f174 100644
--- a/libnm/nm-secret-agent-old.c
+++ b/libnm/nm-secret-agent-old.c
@@ -683,6 +683,8 @@ nm_secret_agent_old_register_async (NMSecretAgentOld *self,
 
 	simple = g_simple_async_result_new (G_OBJECT (self), callback, user_data,
 	                                    nm_secret_agent_old_register_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	if (!check_nm_running (self, &error)) {
 		g_simple_async_result_take_error (simple, error);
@@ -826,6 +828,8 @@ nm_secret_agent_old_unregister_async (NMSecretAgentOld *self,
 
 	simple = g_simple_async_result_new (G_OBJECT (self), callback, user_data,
 	                                    nm_secret_agent_old_unregister_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (simple, cancellable);
 
 	if (!check_nm_running (self, &error)) {
 		g_simple_async_result_take_error (simple, error);
@@ -1159,6 +1163,8 @@ init_async (GAsyncInitable *initable, int io_priority,
 
 	init_data->simple = g_simple_async_result_new (G_OBJECT (initable), callback,
 	                                               user_data, init_async);
+	if (cancellable)
+		g_simple_async_result_set_check_cancellable (init_data->simple, cancellable);
 
 	_nm_dbus_new_connection_async (cancellable, init_async_got_bus, init_data);
 }