equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * MP3/MPlayer plugin to VDR (C++) |
2 * MP3/MPlayer plugin to VDR (C++) |
3 * |
3 * |
4 * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de> |
4 * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de> |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or |
6 * This code is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License |
7 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 |
8 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. |
9 * of the License, or (at your option) any later version. |
404 return res; |
404 return res; |
405 } |
405 } |
406 |
406 |
407 bool cNetStream::ParseHeader(const char *buff, const char *name, char **value) |
407 bool cNetStream::ParseHeader(const char *buff, const char *name, char **value) |
408 { |
408 { |
409 char *s=index(buff,':'); |
409 const char *s=index(buff,':'); |
410 if(s && !strncasecmp(buff,name,s-buff)) { |
410 if(s && !strncasecmp(buff,name,s-buff)) { |
411 s=skipspace(s+1); |
411 s=skipspace(s+1); |
412 d(printf("netstream: found header '%s' contents '%s'\n",name,s)) |
412 d(printf("netstream: found header '%s' contents '%s'\n",name,s)) |
413 free(*value); *value=strdup(s); |
413 free(*value); *value=strdup(s); |
414 return true; |
414 return true; |
526 } |
526 } |
527 } |
527 } |
528 return false; |
528 return false; |
529 } |
529 } |
530 |
530 |
531 char *cNetStream::ParseMetaString(const char *buff, const char *name, char **value) |
531 char *cNetStream::ParseMetaString(char *buff, const char *name, char **value) |
532 { |
532 { |
533 char *s=index(buff,'='); |
533 char *s=index(buff,'='); |
534 if(s && !strncasecmp(buff,name,s-buff)) { |
534 if(s && !strncasecmp(buff,name,s-buff)) { |
535 char *end=index(s+2,'\''); |
535 char *end=index(s+2,'\''); |
536 if(s[1]=='\'' && end) { |
536 if(s[1]=='\'' && end) { |