Improved RTMP push reject message clarity.
This commit is contained in:
parent
e6fce96650
commit
c48ef1e4eb
1 changed files with 3 additions and 3 deletions
|
@ -456,20 +456,20 @@ namespace Mist {
|
||||||
DTSC::Scan streamCfg = DTSC::Scan(serverCfg.mapped, serverCfg.len).getMember("streams").getMember(streamName);
|
DTSC::Scan streamCfg = DTSC::Scan(serverCfg.mapped, serverCfg.len).getMember("streams").getMember(streamName);
|
||||||
if (streamCfg){
|
if (streamCfg){
|
||||||
if (streamCfg.getMember("source").asString().substr(0, 7) != "push://"){
|
if (streamCfg.getMember("source").asString().substr(0, 7) != "push://"){
|
||||||
DEBUG_MSG(DLVL_FAIL, "Push rejected - stream not a push-able stream. (%s != push://*)", streamCfg.getMember("source").asString().c_str());
|
DEBUG_MSG(DLVL_FAIL, "Push rejected - stream %s not a push-able stream. (%s != push://*)", streamName.c_str(), streamCfg.getMember("source").asString().c_str());
|
||||||
myConn.close();
|
myConn.close();
|
||||||
}else{
|
}else{
|
||||||
std::string source = streamCfg.getMember("source").asString().substr(7);
|
std::string source = streamCfg.getMember("source").asString().substr(7);
|
||||||
std::string IP = source.substr(0, source.find('@'));
|
std::string IP = source.substr(0, source.find('@'));
|
||||||
if (IP != ""){
|
if (IP != ""){
|
||||||
if (!myConn.isAddress(IP)){
|
if (!myConn.isAddress(IP)){
|
||||||
DEBUG_MSG(DLVL_FAIL, "Push rejected - source host not whitelisted");
|
DEBUG_MSG(DLVL_FAIL, "Push from %s to %s rejected - source host not whitelisted", myConn.getHost().c_str(), streamName.c_str());
|
||||||
myConn.close();
|
myConn.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
DEBUG_MSG(DLVL_FAIL, "Push rejected - stream not configured.");
|
DEBUG_MSG(DLVL_FAIL, "Push from %s rejected - stream '%s' not configured.", myConn.getHost().c_str(), streamName.c_str());
|
||||||
myConn.close();
|
myConn.close();
|
||||||
}
|
}
|
||||||
configLock.post();
|
configLock.post();
|
||||||
|
|
Loading…
Add table
Reference in a new issue