From 7506f284caacf0d0a7c6ea861c7a4f2ec5260efe Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 26 Sep 2012 14:47:08 +0300 Subject: [PATCH] core: Add support for Role option for RegisterProfile --- src/profile.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/profile.c b/src/profile.c index 22c0797ac..a58e9f91c 100644 --- a/src/profile.c +++ b/src/profile.c @@ -52,6 +52,7 @@ struct ext_profile { char *owner; char *uuid; char *path; + char *role; guint id; @@ -260,6 +261,12 @@ static int parse_ext_opt(struct ext_profile *ext, const char *key, if (type != DBUS_TYPE_BOOLEAN) return -EINVAL; dbus_message_iter_get_basic(value, &ext->authorize); + } else if (strcasecmp(key, "Role") == 0) { + if (type != DBUS_TYPE_STRING) + return -EINVAL; + dbus_message_iter_get_basic(value, &str); + g_free(ext->role); + ext->role = g_strdup(str); } return 0; @@ -334,6 +341,7 @@ static void remove_ext(struct ext_profile *ext) g_free(ext->name); g_free(ext->owner); g_free(ext->uuid); + g_free(ext->role); g_free(ext->path); g_free(ext); -- 2.47.3