From 42d7dce557485a48af298996a973f3f41a554267 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 25 Feb 2016 12:29:32 -0500 Subject: [PATCH] Implement bt_component_set_destroy_cb MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- lib/plugin-system/component.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/plugin-system/component.c b/lib/plugin-system/component.c index 4144d5d4d..859350798 100644 --- a/lib/plugin-system/component.c +++ b/lib/plugin-system/component.c @@ -195,3 +195,18 @@ bt_component_set_private_data(struct bt_component *component, end: return ret; } + +enum bt_component_status bt_component_set_destroy_cb( + struct bt_component *component, bt_component_destroy_cb destroy) +{ + enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + + if (!component) { + ret = BT_COMPONENT_STATUS_INVALID; + goto end; + } + + component->user_destroy = destroy; +end: + return ret; +} -- 2.34.1