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)){
 | 
			
		||||
      std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
 | 
			
		||||
      if (!Triggers::doTrigger("CONN_PLAY", payload, streamName)){
 | 
			
		||||
        onFinish();
 | 
			
		||||
        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;
 | 
			
		||||
          if (!Triggers::doTrigger("USER_NEW", payload, streamName)){
 | 
			
		||||
            MEDIUM_MSG("Closing connection because denied by USER_NEW trigger");
 | 
			
		||||
            onFinish();
 | 
			
		||||
            myConn.close();
 | 
			
		||||
            tmpEx.setSync(100);//100 = denied
 | 
			
		||||
          }else{
 | 
			
		||||
| 
						 | 
				
			
			@ -181,10 +183,12 @@ namespace Mist {
 | 
			
		|||
        }
 | 
			
		||||
        //100 = denied
 | 
			
		||||
        if (tmpEx.getSync() == 100){
 | 
			
		||||
          onFinish();
 | 
			
		||||
          myConn.close();
 | 
			
		||||
          MEDIUM_MSG("Closing connection because denied by USER_NEW sync byte");
 | 
			
		||||
        }
 | 
			
		||||
        if (tmpEx.getSync() == 0 || tmpEx.getSync() == 2){
 | 
			
		||||
          onFinish();
 | 
			
		||||
          myConn.close();
 | 
			
		||||
          FAIL_MSG("Closing connection because sync byte timeout!");
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1303,6 +1307,7 @@ namespace Mist {
 | 
			
		|||
    if (statsPage.getData()){
 | 
			
		||||
      /*LTS-START*/
 | 
			
		||||
      if (!statsPage.isAlive()){
 | 
			
		||||
        onFinish();
 | 
			
		||||
        myConn.close();
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -710,7 +710,7 @@ namespace Mist {
 | 
			
		|||
          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());
 | 
			
		||||
            myConn.close();
 | 
			
		||||
            onFinish();
 | 
			
		||||
            return;
 | 
			
		||||
          }
 | 
			
		||||
          reqUrl = newUrl;
 | 
			
		||||
| 
						 | 
				
			
			@ -770,7 +770,7 @@ namespace Mist {
 | 
			
		|||
              std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl;
 | 
			
		||||
              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());
 | 
			
		||||
                myConn.close();
 | 
			
		||||
                onFinish();
 | 
			
		||||
                configLock.post();
 | 
			
		||||
                configLock.close();
 | 
			
		||||
                return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue