From 52a10eaea7ad949732a5ea9a308c7a3154934f08 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 24 Sep 2020 16:06:56 +0200 Subject: [PATCH] Decreased trigger verbosity, fixed RTMP_PUSH_REWRITE and PUSH_OUT_START triggers not properly ignoring response when ran in non-blocking mode. --- lib/stream.cpp | 2 +- lib/triggers.cpp | 2 +- src/output/output_rtmp.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stream.cpp b/lib/stream.cpp index 6bbf01da..5f426bda 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -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){ if (Triggers::shouldTrigger("PUSH_OUT_START", streamname)){ 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); target = filepath_response; } diff --git a/lib/triggers.cpp b/lib/triggers.cpp index 3198cd7d..9ed69781 100644 --- a/lib/triggers.cpp +++ b/lib/triggers.cpp @@ -209,7 +209,7 @@ namespace Triggers{ if (!defaultResponse.size()){defaultResponse = "true";} 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 (sync){ response = handleTrigger(type, uri, payload, sync, defaultResponse); // do it. diff --git a/src/output/output_rtmp.cpp b/src/output/output_rtmp.cpp index ad2418c0..ec0ce863 100644 --- a/src/output/output_rtmp.cpp +++ b/src/output/output_rtmp.cpp @@ -740,7 +740,7 @@ namespace Mist{ /*LTS-START*/ if(Triggers::shouldTrigger("RTMP_PUSH_REWRITE")){ std::string payload = reqUrl+"\n" + getConnectedHost(); - std::string newUrl = ""; + std::string newUrl = reqUrl; Triggers::doTrigger("RTMP_PUSH_REWRITE", payload, "", false, newUrl); 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());