Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2017-04-18 12:32:39 +02:00
commit 7629b00a4c
10 changed files with 65 additions and 17 deletions

View file

@ -196,6 +196,11 @@ int Controller::handleAPIConnection(Socket::Connection & conn){
}
{//lock the config mutex here - do not unlock until done processing
tthread::lock_guard<tthread::mutex> guard(configMutex);
//Are we local and not forwarded? Instant-authorized.
if (!authorized && !H.hasHeader("X-Real-IP") && conn.isLocal()){
INFO_MSG("Local API access automatically authorized");
authorized = true;
}
//if already authorized, do not re-check for authorization
if (authorized){
Response["authorize"]["status"] = "OK";

View file

@ -370,9 +370,7 @@ namespace Mist {
if (myMeta.live){
//Update the metadata
DTSC::Packet updatePack(myPage.mapped + curOffset, size + 8, true);
myMeta.update(updatePack);
myMeta.update(pack);
}
//End of brain melt
@ -467,6 +465,7 @@ namespace Mist {
myMeta.live = true;
//Store the trackid for easier access
unsigned long tid = packet.getTrackId();
VERYHIGH_MSG("Buffering %s packet on track %lu: %llums, %db", myMeta.tracks[tid].codec.c_str(), tid, packet.getTime(), packet.getPayloadLen());
//Do nothing if the trackid is invalid
if (!tid) {
WARN_MSG("Packet without trackid!");

View file

@ -328,6 +328,7 @@ namespace Mist{
if (nProxy.userClient.getData()){
nProxy.userClient.finish();
}
nProxy.streamName = streamName;
char userPageName[NAME_BUFFER_SIZE];
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
unsigned int attempts = 0;

View file

@ -1119,7 +1119,6 @@ namespace Mist {
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
nProxy.userClient = IPC::sharedClient(userPageName, PLAY_EX_SIZE, true);
}
nProxy.streamName = streamName;
bufferLivePacket(thisPacket);
}
break;