summaryrefslogtreecommitdiffstats
path: root/common/glib-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/glib-helper.c')
-rw-r--r--common/glib-helper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/glib-helper.c b/common/glib-helper.c
index eef6ad8d..001bb4fc 100644
--- a/common/glib-helper.c
+++ b/common/glib-helper.c
@@ -257,3 +257,19 @@ char *bt_uuid2string(uuid_t *uuid)
return str;
}
+
+gchar *bt_list2string(GSList *list)
+{
+ GSList *l;
+ gchar *str = NULL;
+
+ if (!list)
+ return NULL;
+
+ str = g_strdup((const gchar *) list->data);
+
+ for (l = list->next; l; l = l->next)
+ str = g_strconcat(str, ", " , (const gchar *) l->data, NULL);
+
+ return str;
+}