GNOME Bugzilla – Bug 648648
[PATCH] simplify connection filtering logic
Last modified: 2011-05-04 05:35:29 UTC
I added some code to libnm-glib as of 779215c742bbe29a2c66202ec7e2e6d43edeb8ff so we can kill that code from network.js and just use the libnm-glib utility functions. The code in libnm-glib was already present as the *_filter_connections() functions, but network.js usually only checks one connection instead of a list of them. So instead of making network.js build up a single-item list just make libnm-glib better.
Created attachment 186623 [details] [review] Use libnm-glib functions instead of hand-rolling
Review of attachment 186623 [details] [review]: It is surely correct as is, but I think you can remove connectionValid from all subclasses, and leave it in NMDevice base class. By the way, this should also fix downstream bug https://bugzilla.redhat.com/show_bug.cgi?id=693151 (as now NMDeviceEthernet incorrectly ignores pppoe connections) so if possible it should be part of 3.0.2.
Created attachment 186768 [details] [review] Updated patch simplifying the logic Updated patch removes all the unecessary subclass connectionValid() calls, and converts the connectionValidForAP() calls directly into ap.connection_valid() instead.
FYI a version of NM with the necessary libnm-glib changes hit f15 and rawhide yesterday: https://admin.fedoraproject.org/updates/NetworkManager-0.8.998-4.git20110427.fc15
Review of attachment 186768 [details] [review]: If you've tested this, looks good to me.
c31109800b3267df433841bff08c9383a5d669cb and configure.ac updated to require NM 0.8.999 which has the necessary functions and was released today as well.