summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dbus.h7
-rw-r--r--src/dbus.c5
-rw-r--r--src/device.c2
-rw-r--r--src/notifier.c6
-rw-r--r--src/profile.c8
5 files changed, 15 insertions, 13 deletions
diff --git a/include/dbus.h b/include/dbus.h
index db681b96..bc252955 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -55,8 +55,9 @@ void connman_dbus_property_append_dict(DBusMessageIter *iter, const char *key,
connman_dbus_append_cb_t function, void *user_data);
void connman_dbus_property_append_fixed_array(DBusMessageIter *iter,
const char *key, int type, void *val, int len);
-void connman_dbus_property_append_variable_array(DBusMessageIter *dict,
- const char *key, int type, connman_dbus_append_cb_t function);
+void connman_dbus_property_append_variable_array(DBusMessageIter *iter,
+ const char *key, int type,
+ connman_dbus_append_cb_t function, void *user_data);
dbus_bool_t connman_dbus_property_changed_basic(const char *path,
const char *interface, const char *key,
@@ -121,7 +122,7 @@ static inline void connman_dbus_dict_append_variable_array(DBusMessageIter *dict
dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
NULL, &entry);
connman_dbus_property_append_variable_array(&entry, key,
- type, function);
+ type, function, NULL);
dbus_message_iter_close_container(dict, &entry);
}
diff --git a/src/dbus.c b/src/dbus.c
index dbf36230..2253eafb 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -168,7 +168,8 @@ void connman_dbus_property_append_fixed_array(DBusMessageIter *iter,
}
void connman_dbus_property_append_variable_array(DBusMessageIter *iter,
- const char *key, int type, connman_dbus_append_cb_t function)
+ const char *key, int type,
+ connman_dbus_append_cb_t function, void *user_data)
{
DBusMessageIter value, array;
const char *variant_sig, *array_sig;
@@ -194,7 +195,7 @@ void connman_dbus_property_append_variable_array(DBusMessageIter *iter,
dbus_message_iter_open_container(&value, DBUS_TYPE_ARRAY,
array_sig, &array);
if (function)
- function(&array, NULL);
+ function(&array, user_data);
dbus_message_iter_close_container(&value, &array);
dbus_message_iter_close_container(iter, &value);
diff --git a/src/device.c b/src/device.c
index 63aa9157..41b131b0 100644
--- a/src/device.c
+++ b/src/device.c
@@ -505,7 +505,7 @@ static void emit_devices_signal(void)
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter, "Devices",
- DBUS_TYPE_OBJECT_PATH, __connman_device_list);
+ DBUS_TYPE_OBJECT_PATH, __connman_device_list, NULL);
g_dbus_send_message(connection, signal);
}
diff --git a/src/notifier.c b/src/notifier.c
index 2f682f72..de371be3 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -140,7 +140,7 @@ static void technology_registered(enum connman_service_type type,
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter,
"AvailableTechnologies", DBUS_TYPE_STRING,
- __connman_notifier_list_registered);
+ __connman_notifier_list_registered, NULL);
g_dbus_send_message(connection, signal);
}
@@ -162,7 +162,7 @@ static void technology_enabled(enum connman_service_type type,
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter,
"EnabledTechnologies", DBUS_TYPE_STRING,
- __connman_notifier_list_enabled);
+ __connman_notifier_list_enabled, NULL);
g_dbus_send_message(connection, signal);
@@ -191,7 +191,7 @@ static void technology_connected(enum connman_service_type type,
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter,
"ConnectedTechnologies", DBUS_TYPE_STRING,
- __connman_notifier_list_connected);
+ __connman_notifier_list_connected, NULL);
g_dbus_send_message(connection, signal);
}
diff --git a/src/profile.c b/src/profile.c
index fe9ddb8f..808a7c07 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -72,7 +72,7 @@ static void profiles_changed(void)
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter, "Profiles",
- DBUS_TYPE_OBJECT_PATH, __connman_profile_list);
+ DBUS_TYPE_OBJECT_PATH, __connman_profile_list, NULL);
g_dbus_send_message(connection, signal);
}
@@ -167,10 +167,10 @@ static gboolean services_changed(gpointer user_data)
dbus_message_iter_init_append(signal, &iter);
if (g_strcmp0(profile->ident, PROFILE_DEFAULT_IDENT) == 0)
connman_dbus_property_append_variable_array(&iter, "Services",
- DBUS_TYPE_OBJECT_PATH, __connman_service_list);
+ DBUS_TYPE_OBJECT_PATH, __connman_service_list, NULL);
else
connman_dbus_property_append_variable_array(&iter, "Services",
- DBUS_TYPE_OBJECT_PATH, NULL);
+ DBUS_TYPE_OBJECT_PATH, NULL, NULL);
g_dbus_send_message(connection, signal);
@@ -184,7 +184,7 @@ static gboolean services_changed(gpointer user_data)
dbus_message_iter_init_append(signal, &iter);
connman_dbus_property_append_variable_array(&iter, "Services",
- DBUS_TYPE_OBJECT_PATH, __connman_service_list);
+ DBUS_TYPE_OBJECT_PATH, __connman_service_list, NULL);
g_dbus_send_message(connection, signal);