Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Conflicts:
	lib/libdvbsub/dvbsub.cpp
	lib/libtuxtxt/tuxtxt.cpp
	src/driver/lcdd.cpp
	src/zapit/src/femanager.cpp


Origin commit data
------------------
Commit: 40c7218952
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
This commit is contained in:
vanhofen
2017-02-12 23:04:09 +01:00
35 changed files with 111 additions and 43 deletions

View File

@@ -374,9 +374,11 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFro
bp = &cbuf[0];
/* read one line */
while (bp - &cbuf[0] < (int) sizeof(cbuf)) {
while (bp - &cbuf[0] < (int) sizeof(cbuf) - 1) {
unsigned char c;
int res = read(fd, &c, 1);
if (res == 0)
break;
if (res < 0) {
perror("read");
return false;
@@ -384,12 +386,11 @@ bool CStreamManager::Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFro
if ((*bp++ = c) == '\n')
break;
}
*bp = 0;
*bp++ = 0;
printf("CStreamManager::Parse: got %d bytes '%s'", (int)(bp-&cbuf[0]), cbuf);
bp = &cbuf[0];
printf("CStreamManager::Parse: got %s\n", cbuf);
/* send response to http client */
if (!strncmp(cbuf, "GET /", 5)) {
fprintf(fp, "HTTP/1.1 200 OK\r\nServer: streamts (%s)\r\n\r\n", "ts" /*&argv[1][1]*/);