aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-01 22:30:42 +0100
committerMax Kellermann <max@duempel.org>2014-12-01 22:31:29 +0100
commit15213a041d3206f2736462577f1b7c32066c7360 (patch)
tree5307f9f23d7fe23102014e3b915b0a1bebe8c6fb /src/output/plugins
parentfb70a34c8029dd021a3d9a6380252df608b14bcd (diff)
downloadmpd-15213a041d3206f2736462577f1b7c32066c7360.tar.gz
mpd-15213a041d3206f2736462577f1b7c32066c7360.tar.xz
mpd-15213a041d3206f2736462577f1b7c32066c7360.zip
output/httpd/IcyMetaDataServer: don't use GLib types
Diffstat (limited to 'src/output/plugins')
-rw-r--r--src/output/plugins/httpd/IcyMetaDataServer.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/output/plugins/httpd/IcyMetaDataServer.cxx b/src/output/plugins/httpd/IcyMetaDataServer.cxx
index 5bbe10100..5f68ff982 100644
--- a/src/output/plugins/httpd/IcyMetaDataServer.cxx
+++ b/src/output/plugins/httpd/IcyMetaDataServer.cxx
@@ -58,12 +58,12 @@ static char *
icy_server_metadata_string(const char *stream_title, const char* stream_url)
{
// The leading n is a placeholder for the length information
- gchar *icy_metadata = FormatNew("nStreamTitle='%s';"
- "StreamUrl='%s';",
- stream_title,
- stream_url);
+ char *icy_metadata = FormatNew("nStreamTitle='%s';"
+ "StreamUrl='%s';",
+ stream_title,
+ stream_url);
- guint meta_length = strlen(icy_metadata);
+ size_t meta_length = strlen(icy_metadata);
meta_length--; // subtract placeholder
@@ -82,24 +82,24 @@ icy_server_metadata_string(const char *stream_title, const char* stream_url)
Page *
icy_server_metadata_page(const Tag &tag, const TagType *types)
{
- const gchar *tag_items[TAG_NUM_OF_ITEM_TYPES];
+ const char *tag_items[TAG_NUM_OF_ITEM_TYPES];
- gint last_item = -1;
+ int last_item = -1;
while (*types != TAG_NUM_OF_ITEM_TYPES) {
- const gchar *tag_item = tag.GetValue(*types++);
+ const char *tag_item = tag.GetValue(*types++);
if (tag_item)
tag_items[++last_item] = tag_item;
}
- gint item = 0;
+ int item = 0;
// Length + Metadata - "StreamTitle='';StreamUrl='';" = 4081 - 28
- gchar stream_title[(1 + 255 - 28) * 16];
+ char stream_title[(1 + 255 - 28) * 16];
stream_title[0] = '\0';
- guint position = 0;
+ unsigned position = 0;
while (position < sizeof(stream_title) && item <= last_item) {
- gint length = 0;
+ size_t length = 0;
length = g_strlcpy(stream_title + position,
tag_items[item++],
@@ -116,7 +116,7 @@ icy_server_metadata_page(const Tag &tag, const TagType *types)
}
}
- gchar *icy_string = icy_server_metadata_string(stream_title, "");
+ char *icy_string = icy_server_metadata_string(stream_title, "");
if (icy_string == nullptr)
return nullptr;