From 131f5592347929c3d28a4a9406e242e2cfdd5db9 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 19 Aug 2009 17:55:03 +0200 Subject: Write data to an XML file. File path for the XML file is read per channel from the 'xmlpath' option. --- channel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'channel.c') diff --git a/channel.c b/channel.c index c69cf2b..86e993d 100644 --- a/channel.c +++ b/channel.c @@ -13,7 +13,7 @@ void channel_init() { channel_count = 0; } -struct channel_t *channel_add(const char *name) { +struct channel_t *channel_add(const char *name, const char *xmlpath) { channels = realloc(channels, ++channel_count * sizeof(struct channel_t)); if(!channels) { char *error = strerror(errno); @@ -22,6 +22,7 @@ struct channel_t *channel_add(const char *name) { } struct channel_t *channel = &channels[channel_count-1]; channel->name = strdup(name); + channel->xmlpath = strdup(xmlpath); channel->files = NULL; memset(channel->hours, 0, 24*4 * sizeof(unsigned long)); return channel; -- cgit v1.2.3