From 00d06fe2931b63dd634adc34b7b732ab43b5b2fe Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 18 Mar 2013 17:36:12 +0100 Subject: [PATCH] Tweaked Stream and RTMP lib verbosity levels. --- lib/rtmpchunks.cpp | 6 +++--- lib/stream.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rtmpchunks.cpp b/lib/rtmpchunks.cpp index 4f0a203a..887d62f5 100644 --- a/lib/rtmpchunks.cpp +++ b/lib/rtmpchunks.cpp @@ -261,7 +261,7 @@ bool ValidateClientScheme(uint8_t * pBuffer, uint8_t scheme){ uint8_t *pTempHash = new uint8_t[512]; HMACsha256(pTempBuffer, 1536 - 32, genuineFPKey, 30, pTempHash); bool result = (memcmp(pBuffer + clientDigestOffset, pTempHash, 32) == 0); -#if DEBUG >= 4 +#if DEBUG >= 5 fprintf(stderr, "Client scheme validation %hhi %s\n", scheme, result?"success":"failed"); #endif delete[] pTempBuffer; @@ -818,14 +818,14 @@ bool RTMPStream::doHandshake(){ } //"random" data bool encrypted = (Version == 6); -#if DEBUG >= 4 +#if DEBUG >= 8 fprintf(stderr, "Handshake version is %hhi\n", Version); #endif uint8_t _validationScheme = 5; if (ValidateClientScheme(Client, 0)) _validationScheme = 0; if (ValidateClientScheme(Client, 1)) _validationScheme = 1; -#if DEBUG >= 4 +#if DEBUG >= 8 fprintf(stderr, "Handshake type is %hhi, encryption is %s\n", _validationScheme, encrypted?"on":"off"); #endif diff --git a/lib/stream.cpp b/lib/stream.cpp index 2dd2b3b0..1ecd2363 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -52,18 +52,18 @@ Socket::Connection Util::Stream::getStream(std::string streamname){ JSON::Value ServConf = JSON::fromFile("/tmp/mist/streamlist"); if (ServConf["streams"].isMember(streamname)){ if (ServConf["streams"][streamname]["source"].asString()[0] == '/'){ -#if DEBUG >= 4 +#if DEBUG >= 5 std::cerr << "Opening VoD stream from file " << ServConf["streams"][streamname]["source"].asString() << std::endl; #endif return getVod(ServConf["streams"][streamname]["source"].asString()); }else{ -#if DEBUG >= 4 +#if DEBUG >= 5 std::cerr << "Opening live stream " << streamname << std::endl; #endif return Socket::Connection("/tmp/mist/stream_" + streamname); } } -#if DEBUG >= 4 +#if DEBUG >= 5 std::cerr << "Could not open stream " << streamname << " - stream not found" << std::endl; #endif return Socket::Connection();