Below is a patch for:
http://bugs.meego.com/show_bug.cgi?id=10205
When connected to a WiFi service if connmand is killed/restarted, test-connman
services will display a empty list and also test-connman state will show as
offline. Whereas iwconfig correctly show that wlan interface is associated to
network. ping also works fine.
For the existing interface, the interface_property is obtained and for
CurrentBSS interface_bss_added is called which will obtain the BSS properties
by invoking supplicant_dbus_property_get_all. But this dbus call results in a
org.freedesktop.DBus.Error.InvalidArgs error. Same issue is also seen for
CurrentNetwork. As a result no bss_property is obtained and no
GSupplicantNetworks are created and hence the issue.
The org.freedesktop.DBus.Error.InvalidArgs error is seen because the interface
is wrongly specified for getting the BSS and Network property. For eg: the
wpa_supplicant interface for BSS is fi.w1.wpa_supplicant1.BSS whereas in
interface_bss_added it is fi.w1.wpa_supplicant1.Interface.BSS
There are quite a few places where the interfaces are incorrect. Also there is
no such interface fi.w1.wpa_supplicant1.Interface.Blob. Blob signals are sent
on fi.w1.wpa_supplicant1.Interface
Below is the patch with all the above changes.
---
gsupplicant/supplicant.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 2a1021f..861936e 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -824,7 +824,7 @@ static void interface_network_added(DBusMessageIter *iter,
void *user_data)
}
supplicant_dbus_property_get_all(path,
- SUPPLICANT_INTERFACE ".Interface.Network",
+ SUPPLICANT_INTERFACE ".Network",
network_property, network);
}
@@ -1177,7 +1177,7 @@ static void interface_bss_added(DBusMessageIter *iter,
void *user_data)
}
supplicant_dbus_property_get_all(path,
- SUPPLICANT_INTERFACE ".Interface.BSS",
+ SUPPLICANT_INTERFACE ".BSS",
bss_property, bss);
}
@@ -1664,7 +1664,7 @@ static struct {
{ SUPPLICANT_INTERFACE ".Interface", "NetworkAdded",
signal_network_added },
{ SUPPLICANT_INTERFACE ".Interface", "NetworkRemoved",
signal_network_removed },
- { SUPPLICANT_INTERFACE ".Interface.BSS", "PropertiesChanged",
signal_bss_changed },
+ { SUPPLICANT_INTERFACE ".BSS", "PropertiesChanged", signal_bss_changed
},
{ }
};
@@ -2438,11 +2438,9 @@ static const char *g_supplicant_rule2 = "type=signal,"
static const char *g_supplicant_rule3 = "type=signal,"
"interface=" SUPPLICANT_INTERFACE ".Interface.WPS";
static const char *g_supplicant_rule4 = "type=signal,"
- "interface=" SUPPLICANT_INTERFACE ".Interface.BSS";
+ "interface=" SUPPLICANT_INTERFACE ".BSS";
static const char *g_supplicant_rule5 = "type=signal,"
- "interface=" SUPPLICANT_INTERFACE ".Interface.Network";
-static const char *g_supplicant_rule6 = "type=signal,"
- "interface=" SUPPLICANT_INTERFACE ".Interface.Blob";
+ "interface=" SUPPLICANT_INTERFACE ".Network";
static void invoke_introspect_method(void)
{
@@ -2491,7 +2489,6 @@ int g_supplicant_register(const GSupplicantCallbacks
*callbacks)
dbus_bus_add_match(connection, g_supplicant_rule3, NULL);
dbus_bus_add_match(connection, g_supplicant_rule4, NULL);
dbus_bus_add_match(connection, g_supplicant_rule5, NULL);
- dbus_bus_add_match(connection, g_supplicant_rule6, NULL);
dbus_connection_flush(connection);
if (dbus_bus_name_has_owner(connection,
@@ -2533,7 +2530,6 @@ void g_supplicant_unregister(const GSupplicantCallbacks
*callbacks)
SUPPLICANT_DBG("");
if (connection != NULL) {
- dbus_bus_remove_match(connection, g_supplicant_rule6, NULL);
dbus_bus_remove_match(connection, g_supplicant_rule5, NULL);
dbus_bus_remove_match(connection, g_supplicant_rule4, NULL);
dbus_bus_remove_match(connection, g_supplicant_rule3, NULL);
--
1.7.2.2
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman