summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:05:40 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2009-07-19 19:05:40 (GMT)
commit580929d1b2a6c08b0cd68e2d57e7e5d1d06d30d0 (patch)
tree574db44d6f9d76e6755295b7e024e89abb24c3cc
parent26c2a395c34797223010ed6e2c00d6ebcf78241a (diff)
downloadconnman-580929d1b2a6c08b0cd68e2d57e7e5d1d06d30d0.zip
connman-580929d1b2a6c08b0cd68e2d57e7e5d1d06d30d0.tar.gz
connman-580929d1b2a6c08b0cd68e2d57e7e5d1d06d30d0.tar.bz2
Fix the swapped registered vs enabled technologies signal
-rw-r--r--src/notifier.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/notifier.c b/src/notifier.c
index 822cd5c..3ae9a0c 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -144,20 +144,19 @@ void __connman_notifier_list_connected(DBusMessageIter *iter)
}
}
-static void technology_enabled(enum connman_device_type type,
- connman_bool_t enabled)
+static void technology_registered(enum connman_service_type type,
+ connman_bool_t registered)
{
- GSList *list;
DBusMessage *signal;
DBusMessageIter entry, value, iter;
- const char *key = "EnabledTechnologies";
+ const char *key = "AvailableTechnologies";
- DBG("type %d enabled %d", type, enabled);
+ DBG("type %d registered %d", type, registered);
signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
CONNMAN_MANAGER_INTERFACE, "PropertyChanged");
if (signal == NULL)
- goto done;
+ return;
dbus_message_iter_init_append(signal, &entry);
@@ -175,29 +174,22 @@ static void technology_enabled(enum connman_device_type type,
dbus_message_iter_close_container(&entry, &value);
g_dbus_send_message(connection, signal);
-
-done:
- for (list = notifier_list; list; list = list->next) {
- struct connman_notifier *notifier = list->data;
-
- if (notifier->device_enabled)
- notifier->device_enabled(type, enabled);
- }
}
-static void technology_registered(enum connman_service_type type,
- connman_bool_t registered)
+static void technology_enabled(enum connman_device_type type,
+ connman_bool_t enabled)
{
+ GSList *list;
DBusMessage *signal;
DBusMessageIter entry, value, iter;
- const char *key = "AvailableTechnologies";
+ const char *key = "EnabledTechnologies";
- DBG("type %d registered %d", type, registered);
+ DBG("type %d enabled %d", type, enabled);
signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
CONNMAN_MANAGER_INTERFACE, "PropertyChanged");
if (signal == NULL)
- return;
+ goto done;
dbus_message_iter_init_append(signal, &entry);
@@ -215,6 +207,14 @@ static void technology_registered(enum connman_service_type type,
dbus_message_iter_close_container(&entry, &value);
g_dbus_send_message(connection, signal);
+
+done:
+ for (list = notifier_list; list; list = list->next) {
+ struct connman_notifier *notifier = list->data;
+
+ if (notifier->device_enabled)
+ notifier->device_enabled(type, enabled);
+ }
}
static void technology_connected(enum connman_service_type type,