aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-01 01:28:40 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-01 01:28:40 +0000
commitc38fcd30c79b4872914e17f5d5ad89b73d572292 (patch)
treecd0114e7352fdfc8c9de5aaa8759d023caaa5141
parent4ba7779c89b9f87aec1609150ec54d797891433b (diff)
downloadmpd-c38fcd30c79b4872914e17f5d5ad89b73d572292.tar.gz
mpd-c38fcd30c79b4872914e17f5d5ad89b73d572292.tar.xz
mpd-c38fcd30c79b4872914e17f5d5ad89b73d572292.zip
icyName fix
git-svn-id: https://svn.musicpd.org/mpd/trunk@1271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputStream_http.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index 5a4aef2d8..696920ab5 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -368,20 +368,24 @@ static int getHTTPHello(InputStream * inStream) {
data->icyMetaint = atoi(cur+14);
}
else if(0 == strncmp(cur, "\r\nicy-name:", 11)) {
- char * temp = strstr(cur+11,"\r\n");
+ int incr = 11;
+ char * temp = strstr(cur+incr,"\r\n");
if(!temp) break;
*temp = '\0';
if(inStream->metaTitle) free(inStream->metaTitle);
- inStream->metaTitle = strdup(cur+19);
+ while(*(incr+cur) == ' ') incr++;
+ inStream->metaTitle = strdup(cur+incr);
*temp = '\r';
DEBUG("stream icy-name: %s\n", inStream->metaTitle);
}
else if(0 == strncmp(cur, "\r\nx-audiocast-name:", 19)) {
- char * temp = strstr(cur+19,"\r\n");
+ int incr = 19;
+ char * temp = strstr(cur+incr,"\r\n");
if(!temp) break;
*temp = '\0';
if(inStream->metaTitle) free(inStream->metaTitle);
- inStream->metaTitle = strdup(cur+19);
+ while(*(incr+cur) == ' ') incr++;
+ inStream->metaTitle = strdup(cur+incr);
*temp = '\r';
DEBUG("stream audiocast-name: %s\n",
inStream->metaTitle);