Example #1
0
static void
get_secrets_cb (NMSettingsConnection *connection,
                NMSettingsConnectionCallId call_id_s,
                const char *agent_username,
                const char *setting_name,
                GError *error,
                gpointer user_data)
{
	GetSecretsInfo *info = user_data;
	NMActRequestPrivate *priv;

	g_return_if_fail (info && info->call_id == call_id_s);
	g_return_if_fail (NM_IS_ACT_REQUEST (info->self));

	if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
		return;

	priv = NM_ACT_REQUEST_GET_PRIVATE (info->self);

	g_return_if_fail (g_slist_find (priv->secrets_calls, info));

	priv->secrets_calls = g_slist_remove (priv->secrets_calls, info);

	if (info->callback)
		info->callback (info->self, info, connection, error, info->callback_data);

	_get_secrets_info_free (info);
}
static void
get_secrets_cb (NMSettingsConnection *connection,
                guint32 call_id,
                const char *agent_username,
                const char *setting_name,
                GError *error,
                gpointer user_data)
{
	GetSecretsInfo *info = user_data;
	NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (info->self);

	g_return_if_fail (info->call_id == call_id);
	priv->secrets_calls = g_slist_remove (priv->secrets_calls, info);

	info->callback (info->self, call_id, NM_CONNECTION (connection), error, info->callback_data);
	g_free (info);
}