2007-11-08 Dan Williams <dcbw@redhat.com>

* libnm-util/nm-connection.h
	  libnm-util/nm-connection.c
		- (nm_connection_need_secrets): add argument to return hints

	* src/nm-device-802-11-wireless.c
		- (link_timeout_cb, supplicant_connection_timeout_cb,
		   real_act_stage2_config, real_act_stage4_ip_config_timeout): handle
			nm_connection_need_secrets() change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3072 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2007-11-08 19:25:00 +00:00
parent df921e74c5
commit a247281168
4 changed files with 24 additions and 7 deletions

View File

@@ -1,3 +1,14 @@
2007-11-08 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.h
libnm-util/nm-connection.c
- (nm_connection_need_secrets): add argument to return hints
* src/nm-device-802-11-wireless.c
- (link_timeout_cb, supplicant_connection_timeout_cb,
real_act_stage2_config, real_act_stage4_ip_config_timeout): handle
nm_connection_need_secrets() change
2007-11-07 Tambet Ingo <tambet@gmail.com> 2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file. Rework NMSetting structures: Move each setting to it's own file.

View File

@@ -324,7 +324,8 @@ need_secrets_check (gpointer key, gpointer data, gpointer user_data)
} }
const char * const char *
nm_connection_need_secrets (NMConnection *connection) nm_connection_need_secrets (NMConnection *connection,
GPtrArray **hints)
{ {
NMConnectionPrivate *priv; NMConnectionPrivate *priv;
NeedSecretsInfo info = { NULL, NULL }; NeedSecretsInfo info = { NULL, NULL };
@@ -338,7 +339,11 @@ nm_connection_need_secrets (NMConnection *connection)
// all of them. Maybe make info.secrets a hash table mapping // all of them. Maybe make info.secrets a hash table mapping
// settings name :: [list of secrets key names]. // settings name :: [list of secrets key names].
if (info.secrets) { if (info.secrets) {
if (hints)
*hints = info.secrets;
else
g_ptr_array_free (info.secrets, TRUE); g_ptr_array_free (info.secrets, TRUE);
return nm_setting_get_name (info.setting); return nm_setting_get_name (info.setting);
} }

View File

@@ -48,7 +48,8 @@ gboolean nm_connection_compare (NMConnection *connection,
gboolean nm_connection_verify (NMConnection *connection); gboolean nm_connection_verify (NMConnection *connection);
const char * nm_connection_need_secrets (NMConnection *connection); const char * nm_connection_need_secrets (NMConnection *connection,
GPtrArray **hints);
void nm_connection_clear_secrets (NMConnection *connection); void nm_connection_clear_secrets (NMConnection *connection);

View File

@@ -1865,7 +1865,7 @@ link_timeout_cb (gpointer user_data)
goto time_out; goto time_out;
nm_connection_clear_secrets (connection); nm_connection_clear_secrets (connection);
setting_name = nm_connection_need_secrets (connection); setting_name = nm_connection_need_secrets (connection, NULL);
if (!setting_name) if (!setting_name)
goto time_out; goto time_out;
@@ -2274,7 +2274,7 @@ supplicant_connection_timeout_cb (gpointer user_data)
nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH);
nm_connection_clear_secrets (connection); nm_connection_clear_secrets (connection);
setting_name = nm_connection_need_secrets (connection); setting_name = nm_connection_need_secrets (connection, NULL);
if (setting_name) if (setting_name)
nm_act_request_request_connection_secrets (req, setting_name, TRUE); nm_act_request_request_connection_secrets (req, setting_name, TRUE);
} }
@@ -2509,7 +2509,7 @@ real_act_stage2_config (NMDevice *dev)
g_assert (s_connection); g_assert (s_connection);
/* If we need secrets, get them */ /* If we need secrets, get them */
setting_name = nm_connection_need_secrets (connection); setting_name = nm_connection_need_secrets (connection, NULL);
if (setting_name) { if (setting_name) {
guint32 tries; guint32 tries;
@@ -2697,7 +2697,7 @@ real_act_stage4_ip_config_timeout (NMDevice *dev,
nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH);
nm_connection_clear_secrets (connection); nm_connection_clear_secrets (connection);
setting_name = nm_connection_need_secrets (connection); setting_name = nm_connection_need_secrets (connection, NULL);
if (setting_name) if (setting_name)
nm_act_request_request_connection_secrets (req, setting_name, TRUE); nm_act_request_request_connection_secrets (req, setting_name, TRUE);