Diff between 405afea4a5d6a2a7ac42ed99d792135a0a20ddcd and 0d048414480f7416f38f930c14187c6aea5f4919

Changed Files

File Additions Deletions Status
src/profile.c +18 -0 modified
src/profile.h +1 -0 modified

Full Patch

diff --git a/src/profile.c b/src/profile.c
index 7bb1db5..c7c791c 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -2235,6 +2235,24 @@ static void free_property(gpointer data)
 	g_free(p);
 }
 
+void btd_profile_remove_custom_prop(const char *uuid, const char *name)
+{
+	GSList *l;
+
+	for (l = custom_props; l; l = l->next) {
+		struct btd_profile_custom_property *prop = l->data;
+
+		if (strcasecmp(prop->uuid, uuid) != 0)
+			continue;
+
+		if (g_strcmp0(prop->name, name) != 0)
+			continue;
+
+		custom_props = g_slist_delete_link(custom_props, l);
+		free_property(prop);
+	}
+}
+
 void btd_profile_init(void)
 {
 	g_dbus_register_interface(btd_get_dbus_connection(),
diff --git a/src/profile.h b/src/profile.h
index 8339c7a..fe332d9 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -72,6 +72,7 @@ void btd_profile_add_custom_prop(const char *uuid, const char *type,
 					btd_profile_prop_exists exists,
 					btd_profile_prop_get get,
 					void *user_data);
+void btd_profile_remove_custom_prop(const char *uuid, const char *name);
 
 void btd_profile_init(void);
 void btd_profile_cleanup(void);