summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-06-01 14:15:59 +0000
committerphintuka <phintuka>2009-06-01 14:15:59 +0000
commitddbd3faea2112f12f2ff17adcd6397ffee858fc1 (patch)
tree8f1b184d0e69eb08d9097a44a3040f55a1553a8a
parentbf5e58e57e9ab05036c856612f566653f6d9d528 (diff)
downloadxineliboutput-ddbd3faea2112f12f2ff17adcd6397ffee858fc1.tar.gz
xineliboutput-ddbd3faea2112f12f2ff17adcd6397ffee858fc1.tar.bz2
Removed invalid cast from (const char *) -> (char *)
Do not change value of const string
-rw-r--r--frontend_svr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/frontend_svr.c b/frontend_svr.c
index b61a983a..602d76bf 100644
--- a/frontend_svr.c
+++ b/frontend_svr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_svr.c,v 1.72 2009-03-24 19:20:54 phintuka Exp $
+ * $Id: frontend_svr.c,v 1.73 2009-06-01 14:15:59 phintuka Exp $
*
*/
@@ -1398,11 +1398,12 @@ void cXinelibServer::Handle_Control_HTTP(int cli, const char *arg)
}
if( *m_FileName && m_bPlayingFile) {
- char *pos = strstr(m_FileName, "#subtitle:");
- if(pos) *pos = 0;
- bool Allow = ( !strcmp_escaped(m_FileName, m_State[cli]->Uri() + 9)
+ cString file = m_FileName;
+ const char *pos = strstr(m_FileName, "#subtitle:");
+ if(pos)
+ file.Truncate(pos - m_FileName);
+ bool Allow = ( !strcmp_escaped(file, m_State[cli]->Uri() + 9)
|| (pos && !strcmp_escaped(pos + 10, m_State[cli]->Uri() + 9)));
- if(pos) *pos = '#';
if(Allow) {
LOGMSG("HTTP streaming media file");