Changed several onFinish'es into onFail, where appropriate
This commit is contained in:
parent
7dd7cc6fe1
commit
7540bfa27f
1 changed files with 4 additions and 8 deletions
|
@ -194,8 +194,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("CONN_PLAY", payload, streamName)){
|
if (!Triggers::doTrigger("CONN_PLAY", payload, streamName)){
|
||||||
INFO_MSG("Shutting down due to CONN_PLAY trigger rejection");
|
INFO_MSG("Shutting down due to CONN_PLAY trigger rejection");
|
||||||
onFinish();
|
onFail();
|
||||||
myConn.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
doSync(true);
|
doSync(true);
|
||||||
|
@ -274,8 +273,7 @@ namespace Mist{
|
||||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value((long long)crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl+"\n"+tmpEx.getSessId();
|
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value((long long)crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl+"\n"+tmpEx.getSessId();
|
||||||
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();
|
onFail();
|
||||||
myConn.close();
|
|
||||||
tmpEx.setSync(100);//100 = denied
|
tmpEx.setSync(100);//100 = denied
|
||||||
}else{
|
}else{
|
||||||
tmpEx.setSync(10);//10 = accepted
|
tmpEx.setSync(10);//10 = accepted
|
||||||
|
@ -283,13 +281,11 @@ namespace Mist{
|
||||||
}
|
}
|
||||||
//100 = denied
|
//100 = denied
|
||||||
if (tmpEx.getSync() == 100){
|
if (tmpEx.getSync() == 100){
|
||||||
onFinish();
|
onFail();
|
||||||
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();
|
onFail();
|
||||||
myConn.close();
|
|
||||||
FAIL_MSG("Closing connection because sync byte timeout!");
|
FAIL_MSG("Closing connection because sync byte timeout!");
|
||||||
}
|
}
|
||||||
//anything else = accepted
|
//anything else = accepted
|
||||||
|
|
Loading…
Add table
Reference in a new issue