Decreased trigger verbosity, fixed RTMP_PUSH_REWRITE and PUSH_OUT_START triggers not properly ignoring response when ran in non-blocking mode.
This commit is contained in:
parent
c2ecab2e6b
commit
52a10eaea7
3 changed files with 3 additions and 3 deletions
|
@ -560,7 +560,7 @@ JSON::Value Util::getInputBySource(const std::string &filename, bool isProvider)
|
||||||
pid_t Util::startPush(const std::string &streamname, std::string &target){
|
pid_t Util::startPush(const std::string &streamname, std::string &target){
|
||||||
if (Triggers::shouldTrigger("PUSH_OUT_START", streamname)){
|
if (Triggers::shouldTrigger("PUSH_OUT_START", streamname)){
|
||||||
std::string payload = streamname + "\n" + target;
|
std::string payload = streamname + "\n" + target;
|
||||||
std::string filepath_response;
|
std::string filepath_response = target;
|
||||||
Triggers::doTrigger("PUSH_OUT_START", payload, streamname.c_str(), false, filepath_response);
|
Triggers::doTrigger("PUSH_OUT_START", payload, streamname.c_str(), false, filepath_response);
|
||||||
target = filepath_response;
|
target = filepath_response;
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ namespace Triggers{
|
||||||
if (!defaultResponse.size()){defaultResponse = "true";}
|
if (!defaultResponse.size()){defaultResponse = "true";}
|
||||||
|
|
||||||
if (isHandled){
|
if (isHandled){
|
||||||
INFO_MSG("%s trigger handled by %s", type.c_str(), uri.c_str());
|
VERYHIGH_MSG("%s trigger handled by %s", type.c_str(), uri.c_str());
|
||||||
if (dryRun){return true;}
|
if (dryRun){return true;}
|
||||||
if (sync){
|
if (sync){
|
||||||
response = handleTrigger(type, uri, payload, sync, defaultResponse); // do it.
|
response = handleTrigger(type, uri, payload, sync, defaultResponse); // do it.
|
||||||
|
|
|
@ -740,7 +740,7 @@ namespace Mist{
|
||||||
/*LTS-START*/
|
/*LTS-START*/
|
||||||
if(Triggers::shouldTrigger("RTMP_PUSH_REWRITE")){
|
if(Triggers::shouldTrigger("RTMP_PUSH_REWRITE")){
|
||||||
std::string payload = reqUrl+"\n" + getConnectedHost();
|
std::string payload = reqUrl+"\n" + getConnectedHost();
|
||||||
std::string newUrl = "";
|
std::string newUrl = reqUrl;
|
||||||
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());
|
||||||
|
|
Loading…
Add table
Reference in a new issue