Pro side of RTMP fixes
This commit is contained in:
parent
2f6cd40fb3
commit
d7b1f05b51
2 changed files with 7 additions and 2 deletions
|
@ -140,6 +140,7 @@ namespace Mist {
|
||||||
if(Triggers::shouldTrigger("CONN_PLAY", streamName)){
|
if(Triggers::shouldTrigger("CONN_PLAY", streamName)){
|
||||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
||||||
if (!Triggers::doTrigger("CONN_PLAY", payload, streamName)){
|
if (!Triggers::doTrigger("CONN_PLAY", payload, streamName)){
|
||||||
|
onFinish();
|
||||||
myConn.close();
|
myConn.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,6 +174,7 @@ namespace Mist {
|
||||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value((long long)crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value((long long)crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
||||||
if (!Triggers::doTrigger("USER_NEW", payload, streamName)){
|
if (!Triggers::doTrigger("USER_NEW", payload, streamName)){
|
||||||
MEDIUM_MSG("Closing connection because denied by USER_NEW trigger");
|
MEDIUM_MSG("Closing connection because denied by USER_NEW trigger");
|
||||||
|
onFinish();
|
||||||
myConn.close();
|
myConn.close();
|
||||||
tmpEx.setSync(100);//100 = denied
|
tmpEx.setSync(100);//100 = denied
|
||||||
}else{
|
}else{
|
||||||
|
@ -181,10 +183,12 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
//100 = denied
|
//100 = denied
|
||||||
if (tmpEx.getSync() == 100){
|
if (tmpEx.getSync() == 100){
|
||||||
|
onFinish();
|
||||||
myConn.close();
|
myConn.close();
|
||||||
MEDIUM_MSG("Closing connection because denied by USER_NEW sync byte");
|
MEDIUM_MSG("Closing connection because denied by USER_NEW sync byte");
|
||||||
}
|
}
|
||||||
if (tmpEx.getSync() == 0 || tmpEx.getSync() == 2){
|
if (tmpEx.getSync() == 0 || tmpEx.getSync() == 2){
|
||||||
|
onFinish();
|
||||||
myConn.close();
|
myConn.close();
|
||||||
FAIL_MSG("Closing connection because sync byte timeout!");
|
FAIL_MSG("Closing connection because sync byte timeout!");
|
||||||
}
|
}
|
||||||
|
@ -1303,6 +1307,7 @@ namespace Mist {
|
||||||
if (statsPage.getData()){
|
if (statsPage.getData()){
|
||||||
/*LTS-START*/
|
/*LTS-START*/
|
||||||
if (!statsPage.isAlive()){
|
if (!statsPage.isAlive()){
|
||||||
|
onFinish();
|
||||||
myConn.close();
|
myConn.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -710,7 +710,7 @@ namespace Mist {
|
||||||
Triggers::doTrigger("RTMP_PUSH_REWRITE", payload, "", false, newUrl);
|
Triggers::doTrigger("RTMP_PUSH_REWRITE", payload, "", false, newUrl);
|
||||||
if (!newUrl.size()){
|
if (!newUrl.size()){
|
||||||
FAIL_MSG("Push from %s to URL %s rejected - RTMP_PUSH_REWRITE trigger blanked the URL", getConnectedHost().c_str(), reqUrl.c_str());
|
FAIL_MSG("Push from %s to URL %s rejected - RTMP_PUSH_REWRITE trigger blanked the URL", getConnectedHost().c_str(), reqUrl.c_str());
|
||||||
myConn.close();
|
onFinish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
reqUrl = newUrl;
|
reqUrl = newUrl;
|
||||||
|
@ -770,7 +770,7 @@ namespace Mist {
|
||||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
|
||||||
if (!Triggers::doTrigger("STREAM_PUSH", payload, smp)){
|
if (!Triggers::doTrigger("STREAM_PUSH", payload, smp)){
|
||||||
FAIL_MSG("Push from %s to %s rejected - STREAM_PUSH trigger denied the push", getConnectedHost().c_str(), streamName.c_str());
|
FAIL_MSG("Push from %s to %s rejected - STREAM_PUSH trigger denied the push", getConnectedHost().c_str(), streamName.c_str());
|
||||||
myConn.close();
|
onFinish();
|
||||||
configLock.post();
|
configLock.post();
|
||||||
configLock.close();
|
configLock.close();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue