aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_introspect.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-08-07 08:16:05 (GMT)
committerJouni Malinen <j@w1.fi>2011-08-07 08:16:05 (GMT)
commit3320666494a5b2c313fc4ae43ee6d7063639931e (patch)
treeff5283c712a31433aed4180186a3e54b7fea19c8 /wpa_supplicant/dbus/dbus_new_introspect.c
parentd26e45a44a1403dc6145a29f2502fb8469325a15 (diff)
downloadhostap-3320666494a5b2c313fc4ae43ee6d7063639931e.zip
hostap-3320666494a5b2c313fc4ae43ee6d7063639931e.tar.gz
hostap-3320666494a5b2c313fc4ae43ee6d7063639931e.tar.bz2
dbus: Remove separate access variable from properties
The read, write, read-write permissions can be figured out from getter/setter function pointers, so there is no need for maintaining that information separately.
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_introspect.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_introspect.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_introspect.c b/wpa_supplicant/dbus/dbus_new_introspect.c
index fd433df..fb29f20 100644
--- a/wpa_supplicant/dbus/dbus_new_introspect.c
+++ b/wpa_supplicant/dbus/dbus_new_introspect.c
@@ -89,10 +89,11 @@ static void add_entry(struct wpabuf *xml, const char *type, const char *name,
static void add_property(struct wpabuf *xml,
const struct wpa_dbus_property_desc *dsc)
{
- wpabuf_printf(xml, "<property name=\"%s\" type=\"%s\" access=\"%s\"/>",
+ wpabuf_printf(xml, "<property name=\"%s\" type=\"%s\" "
+ "access=\"%s%s\"/>",
dsc->dbus_property, dsc->type,
- (dsc->access == R ? "read" :
- (dsc->access == W ? "write" : "readwrite")));
+ dsc->getter ? "read" : "",
+ dsc->setter ? "write" : "");
}