wifi: don't autoconnect to networks that have never been successful
authorDan Williams <dcbw@redhat.com>
Thu, 13 Sep 2012 03:54:44 +0000 (22:54 -0500)
committerDan Williams <dcbw@redhat.com>
Thu, 20 Sep 2012 15:11:36 +0000 (10:11 -0500)
commitccfe5fec8d1c1038467e4a56656d8f90bc94d2ed
tree6944e03af67a77fd6c635b2466892ac404929b8f
parent1966aba8e9a4a438da347c96d4ebd02449914e5e
wifi: don't autoconnect to networks that have never been successful

If you accidentally click on an wifi network in the menu, and you
don't know the password, and cancel, the connection always stuck
around and was available for autoconnection.  That's annoying, and
it's a few clicks to go delete them.  But better yet, we can
slightly repurpose the 'timestamp' property of connections to
determine whether or not they've been successfully connected in the
past; NM stores timestamps for all connections as of version 0.9.

So if a wifi connection hasn't ever been successful (which means it
has a timestamp in the timestamp cache, but that timestamp is zero),
don't try to autoconnect it.

Preloaded connections without a timestamp will still be autoconnected
at least once (as they always have) because they won't yet have a
timestamp in the timestamp cache.
TODO
src/nm-device-wifi.c