summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Houston <stephen@localhost.localdomain>2017-11-30 10:52:35 -0600
committerStephen Houston <stephen@localhost.localdomain>2017-11-30 10:52:35 -0600
commitd1788bde1f21ef30a2f168f93890cf2401975e59 (patch)
tree7e75c1004d9079583665119a5a3a1f050012e9e5
parente4f8c89899d3287e4639566bffb2e248bd82d0e1 (diff)
Update aps and their corresponding settings when things change.
-rw-r--r--TODO4
-rw-r--r--src/networkmanager.c25
2 files changed, 25 insertions, 4 deletions
diff --git a/TODO b/TODO
index 8c98b9e..453ca3b 100644
--- a/TODO
+++ b/TODO
@@ -2,13 +2,15 @@ NetworkManager Support:
2 2
3--Untested-- 3--Untested--
4DNS config editing - DNS domain and name servers are likely not stored correctly. 4DNS config editing - DNS domain and name servers are likely not stored correctly.
5
5Proxy config editing 6Proxy config editing
6 7
7--Issues-- 8--Issues--
8Doesn't always update the icon correctly - Forgetting a wifi network goes back to ethernet mode... why? 9Doesn't always update the icon correctly - Forgetting a wifi network goes back to ethernet mode... why?
10
9Random crashes -- Are they sandbox related or wireless related? 11Random crashes -- Are they sandbox related or wireless related?
10 12
11When forgetting a network the connection setting is removed and thus doesn't show up in the network list anymore -- however the access point is still available so this should somehow update that the connection setting is removed but not the access point. 13There is a duplicate entry for settings and aps in the wifi list -- This is so that when you delete a setting, the ap still exists. Is there a better way to do that?
12 14
13--Needed-- 15--Needed--
14Add WEP support to agent. Currently only WPA will work. 16Add WEP support to agent. Currently only WPA will work.
diff --git a/src/networkmanager.c b/src/networkmanager.c
index d3e74c8..eaa124a 100644
--- a/src/networkmanager.c
+++ b/src/networkmanager.c
@@ -1506,7 +1506,8 @@ static void
1506_networkmanager_manager_getap(void *data, const void *msg, Eldbus_Message_Iter *it) 1506_networkmanager_manager_getap(void *data, const void *msg, Eldbus_Message_Iter *it)
1507{ 1507{
1508 const char *setting = msg; 1508 const char *setting = msg;
1509 NetworkManager_Service *ns = data; 1509 Eina_List *l;
1510 NetworkManager_Service *ns = data, *nss;
1510 1511
1511 if (eina_streq(setting, "Ssid")) 1512 if (eina_streq(setting, "Ssid"))
1512 { 1513 {
@@ -1573,6 +1574,26 @@ _networkmanager_manager_getap(void *data, const void *msg, Eldbus_Message_Iter *
1573 ns->security = WIRELESS_NETWORK_SECURITY_IEEE8021X; 1574 ns->security = WIRELESS_NETWORK_SECURITY_IEEE8021X;
1574 } 1575 }
1575 } 1576 }
1577 EINA_LIST_FOREACH(networkmanager_services_list[ns->type], l, nss)
1578 {
1579 if (!nss->access_point)
1580 {
1581 if (!nss->conn_ssid) continue;
1582 if (eina_streq(ns->name, nss->conn_ssid))
1583 {
1584 if (nss->strength < ns->strength)
1585 {
1586 nss->strength = ns->strength;
1587 nss->security = ns->security;
1588 if (nss->wn)
1589 free(nss->wn);
1590 _networkmanager_service_convert(nss);
1591 if (_networkmanager_service_is_connected(nss))
1592 _networkmanager_update_current_network(nss, nss->type);
1593 }
1594 }
1595 }
1596 }
1576} 1597}
1577 1598
1578static void 1599static void
@@ -1805,8 +1826,6 @@ _networkmanager_service_ap_new(int type, const char *path, Eldbus_Message_Iter *
1805 free(nss->wn); 1826 free(nss->wn);
1806 _networkmanager_service_convert(nss); 1827 _networkmanager_service_convert(nss);
1807 } 1828 }
1808 _networkmanager_service_free_nolist(ns);
1809 return NULL;
1810 } 1829 }
1811 } 1830 }
1812 } 1831 }