vpn: clear secrets after successful activation

We're already connected; shouldn't need secrets again but
if we do, we'll ask for them again.  Fixes an issue where
reconnect would use an old one-time-password.
This commit is contained in:
Dan Williams 2011-02-10 18:07:04 -06:00
parent ee2c19a64f
commit 2ec115bb64

View file

@ -984,6 +984,10 @@ connection_state_changed (NMVPNConnection *self,
case NM_VPN_CONNECTION_STATE_NEED_AUTH:
get_existing_secrets (self);
break;
case NM_VPN_CONNECTION_STATE_ACTIVATED:
/* Secrets no longer needed now that we're connected */
nm_connection_clear_secrets (priv->connection);
break;
case NM_VPN_CONNECTION_STATE_DISCONNECTED:
case NM_VPN_CONNECTION_STATE_FAILED:
if (priv->proxy) {