diff --git a/ChangeLog b/ChangeLog index 222b3bc32..d1940685e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-11-08 Dan Williams + + * 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 Rework NMSetting structures: Move each setting to it's own file. diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c index 0096dbaf9..a969af3c3 100644 --- a/libnm-util/nm-connection.c +++ b/libnm-util/nm-connection.c @@ -324,7 +324,8 @@ need_secrets_check (gpointer key, gpointer data, gpointer user_data) } const char * -nm_connection_need_secrets (NMConnection *connection) +nm_connection_need_secrets (NMConnection *connection, + GPtrArray **hints) { NMConnectionPrivate *priv; 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 // settings name :: [list of secrets key names]. if (info.secrets) { - g_ptr_array_free (info.secrets, TRUE); + if (hints) + *hints = info.secrets; + else + g_ptr_array_free (info.secrets, TRUE); + return nm_setting_get_name (info.setting); } diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h index 29bebb92e..aaddf67d5 100644 --- a/libnm-util/nm-connection.h +++ b/libnm-util/nm-connection.h @@ -48,7 +48,8 @@ gboolean nm_connection_compare (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); diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index 473b912fc..647b00834 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -1865,7 +1865,7 @@ link_timeout_cb (gpointer user_data) goto time_out; nm_connection_clear_secrets (connection); - setting_name = nm_connection_need_secrets (connection); + setting_name = nm_connection_need_secrets (connection, NULL); if (!setting_name) 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_connection_clear_secrets (connection); - setting_name = nm_connection_need_secrets (connection); + setting_name = nm_connection_need_secrets (connection, NULL); if (setting_name) nm_act_request_request_connection_secrets (req, setting_name, TRUE); } @@ -2509,7 +2509,7 @@ real_act_stage2_config (NMDevice *dev) g_assert (s_connection); /* If we need secrets, get them */ - setting_name = nm_connection_need_secrets (connection); + setting_name = nm_connection_need_secrets (connection, NULL); if (setting_name) { 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_connection_clear_secrets (connection); - setting_name = nm_connection_need_secrets (connection); + setting_name = nm_connection_need_secrets (connection, NULL); if (setting_name) nm_act_request_request_connection_secrets (req, setting_name, TRUE);