diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-19 17:55:03 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-19 17:55:03 +0200 |
commit | 131f5592347929c3d28a4a9406e242e2cfdd5db9 (patch) | |
tree | a7434fb93b1856665c34380a77f655a54bae0332 /channel.c | |
parent | 44f3e1486fb5fd45644683af83aaaf27047e4250 (diff) |
Write data to an XML file.
File path for the XML file is read per channel from the 'xmlpath'
option.
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |