diff --git a/channel.c b/channel.c index 0c659fd..1c1d3d3 100644 --- a/channel.c +++ b/channel.c @@ -67,8 +67,13 @@ char output[256]; tuveChanList_t *tmpChan = 0x0; tmpChan = findChan(channel); + + if (tmpChan == 0x0) + return(0x1); + sprintf(output,"CURPOS:%i:%s:%s:%i:%i\n",tmpChan->songTime - (tmpChan->videoEnd - (time(NULL) + VIDE_PAD_TIME)),tmpChan->videoFile,tmpChan->videoTitle,tmpChan->songTime,tmpChan->vid); tuveSendAllInChan(channel,0x0,output); + return(0x0); } /* @@ -81,6 +86,17 @@ int min, sec; int i = 0x0; + + + + + + + + + + + tmpChan = findChan(channel); if (tmpChan != 0x0) { diff --git a/tuve.c b/tuve.c index 76bd64d..e0777c4 100644 --- a/tuve.c +++ b/tuve.c @@ -289,8 +289,10 @@ tok_last = 0x0; chan = strtok_r(data,":",&tok_last); msg = strtok_r(NULL,"\n",&tok_last); - if (msg[0] == '0') - tuveChanResume(chan); + if (msg[0] == '0') { + if (tuveChanResume(chan) == 0x1) + sSendData(userConnection,"MSG:TUveD:STATUS:Sorry Invalid Live Parameters\n"); + } else { sprintf(output,"CURPOS:-1:%s:Live Stream:600:0\n",msg); tuveSendAllInChan(chan,0x0,output);