summaryrefslogtreecommitdiff
path: root/content/content.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/content.c')
-rw-r--r--content/content.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index 548e08418..782e1a370 100644
--- a/content/content.c
+++ b/content/content.c
@@ -1038,6 +1038,20 @@ void content_add_error(struct content *c, const char *token,
{
}
+bool content__set_title(struct content *c, const char *title)
+{
+ char *new_title = talloc_strdup(c, title);
+ if (new_title == NULL)
+ return false;
+
+ if (c->title != NULL)
+ talloc_free(c->title);
+
+ c->title = new_title;
+
+ return true;
+}
+
/**
* Retrieve type of content
*