+ colander_data->user_notif = user_provided_data->notification;
+
+ if (user_provided_data->notification_types) {
+ notif_type = user_provided_data->notification_types;
+ unsigned long count;
+
+ while (*notif_type != BT_NOTIFICATION_TYPE_SENTINEL) {
+ notif_type++;
+ }
+
+ count = notif_type - user_provided_data->notification_types + 1;
+
+ colander_data->notif_types =
+ g_new0(enum bt_notification_type, count);
+ if (!colander_data->notif_types) {
+ BT_LOGE_STR("Failed to allocate an array of notification types.");
+ status = BT_COMPONENT_STATUS_NOMEM;
+ goto end;
+ }
+
+ memcpy(colander_data->notif_types,
+ user_provided_data->notification_types,
+ count * sizeof(enum bt_notification_type));
+ }
+