diff options
author | Max Kellermann <max@duempel.org> | 2013-01-28 23:41:45 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-28 23:41:45 +0100 |
commit | 76417d44464248949e7843eee0d5338a8e0a22ac (patch) | |
tree | c8f6416505b7268ce4f3902660ba35f4e35d1c04 /src/input/CurlInputPlugin.cxx | |
parent | cffc78ad6a978c8ef0afae4fbdd4b189612a7167 (diff) | |
download | mpd-76417d44464248949e7843eee0d5338a8e0a22ac.tar.gz mpd-76417d44464248949e7843eee0d5338a8e0a22ac.tar.xz mpd-76417d44464248949e7843eee0d5338a8e0a22ac.zip |
InputStream: use std::string
Diffstat (limited to 'src/input/CurlInputPlugin.cxx')
-rw-r--r-- | src/input/CurlInputPlugin.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index f3edf1dc8..550bcd0ce 100644 --- a/src/input/CurlInputPlugin.cxx +++ b/src/input/CurlInputPlugin.cxx @@ -925,8 +925,7 @@ input_curl_headerfunction(void *ptr, size_t size, size_t nmemb, void *stream) c->base.size = c->base.offset + g_ascii_strtoull(buffer, NULL, 10); } else if (g_ascii_strcasecmp(name, "content-type") == 0) { - g_free(c->base.mime); - c->base.mime = g_strndup(value, end - value); + c->base.mime.assign(value, end); } else if (g_ascii_strcasecmp(name, "icy-name") == 0 || g_ascii_strcasecmp(name, "ice-name") == 0 || g_ascii_strcasecmp(name, "x-audiocast-name") == 0) { @@ -1031,7 +1030,7 @@ input_curl_easy_init(struct input_curl *c, GError **error_r) g_free(proxy_auth_str); } - code = curl_easy_setopt(c->easy, CURLOPT_URL, c->base.uri); + code = curl_easy_setopt(c->easy, CURLOPT_URL, c->base.uri.c_str()); if (code != CURLE_OK) { g_set_error(error_r, curl_quark(), code, "curl_easy_setopt() failed: %s", |