Introduced TORRENT_UTP_LOG_ENABLE macro to guarantee that TORRENT_UTP_LOG and TORRENT_VERBOSE_UTP_LOG are always defined (no need to change a lot of macro if).

This commit is contained in:
Alden Torres 2015-08-12 23:00:28 -04:00
parent 7d11198911
commit 9e29eb9978
2 changed files with 8 additions and 2 deletions

View File

@ -473,8 +473,7 @@ feature disk-stats : off on : composite propagated link-incompatible ;
feature.compose <disk-stats>on : <define>TORRENT_DISK_STATS ;
feature utp-log : off on : composite propagated link-incompatible ;
feature.compose <utp-log>off : <define>TORRENT_UTP_LOG=0 <define>TORRENT_VERBOSE_UTP_LOG=0 ;
feature.compose <utp-log>on : <define>TORRENT_UTP_LOG=1 <define>TORRENT_VERBOSE_UTP_LOG=1 ;
feature.compose <utp-log>on : <define>TORRENT_UTP_LOG_ENABLE ;
feature simulate-slow-read : off on : composite propagated ;
feature.compose <simulate-slow-read>on : <define>TORRENT_SIMULATE_SLOW_READ ;

View File

@ -55,6 +55,13 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
#ifndef TORRENT_UTP_LOG_ENABLE
#define TORRENT_UTP_LOG 0
#define TORRENT_VERBOSE_UTP_LOG 0
#else
#define TORRENT_UTP_LOG 1
#define TORRENT_VERBOSE_UTP_LOG 1
#endif
#ifdef TORRENT_UTP_LOG
bool is_utp_stream_logging();