From bb8d1d0e56209dcfb4bb588d42dc443ea4ef53c4 Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Sun, 3 Apr 2016 22:30:56 -0400 Subject: [PATCH] Revert utp log file to disable by default Documentation typos --- include/libtorrent/torrent_info.hpp | 2 +- include/libtorrent/torrent_peer.hpp | 6 +++--- include/libtorrent/utp_stream.hpp | 8 ++++---- src/torrent_peer.cpp | 2 +- src/utp_stream.cpp | 10 ++++------ 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/include/libtorrent/torrent_info.hpp b/include/libtorrent/torrent_info.hpp index 84e13b490..03c9a8bb1 100644 --- a/include/libtorrent/torrent_info.hpp +++ b/include/libtorrent/torrent_info.hpp @@ -190,7 +190,7 @@ namespace libtorrent // // ``orig_files()`` returns the original (unmodified) file storage for // this torrent. This is used by the web server connection, which needs - // to request files with the original names. Filename may be chaged using + // to request files with the original names. Filename may be changed using // ``torrent_info::rename_file()``. // // For more information on the file_storage object, see the separate diff --git a/include/libtorrent/torrent_peer.hpp b/include/libtorrent/torrent_peer.hpp index 853f9a0e0..901e3608d 100644 --- a/include/libtorrent/torrent_peer.hpp +++ b/include/libtorrent/torrent_peer.hpp @@ -73,7 +73,7 @@ namespace libtorrent // this torrent_peer. i.e. These are only updated // when the connection is closed. For the // total amount of upload and download - // we'll have to add thes figures with the + // we'll have to add these figures with the // statistics from the peer_connection. // since these values don't need to be stored // with byte-precision, they specify the number @@ -115,7 +115,7 @@ namespace libtorrent // this torrent_peer has unsigned failcount:5; // [0, 31] - // incoming peers (that don't advertize their listen port) + // incoming peers (that don't advertise their listen port) // will not be considered connectable. Peers that // we have a listen port for will be assumed to be. bool connectable:1; @@ -188,7 +188,7 @@ namespace libtorrent bool supports_holepunch:1; // this is set to one for web seeds. Web seeds // are not stored in the policy m_peers list, - // and are excempt from connect candidate bookkeeping + // and are exempt from connect candidate bookkeeping // so, any torrent_peer with the web_seed bit set, is // never considered a connect candidate bool web_seed:1; diff --git a/include/libtorrent/utp_stream.hpp b/include/libtorrent/utp_stream.hpp index 2728f77f5..ede524e2e 100644 --- a/include/libtorrent/utp_stream.hpp +++ b/include/libtorrent/utp_stream.hpp @@ -64,10 +64,10 @@ namespace libtorrent #endif #if TORRENT_UTP_LOG - bool is_utp_stream_logging(); + TORRENT_EXPORT bool is_utp_stream_logging(); // This function should be used at the very beginning and very end of your program. - void set_utp_stream_logging(bool enable); + TORRENT_EXPORT void set_utp_stream_logging(bool enable); #endif TORRENT_EXTRA_EXPORT bool compare_less_wrap(boost::uint32_t lhs @@ -90,8 +90,8 @@ namespace libtorrent }; // internal: the point of the bif_endian_int is two-fold - // one purpuse is to not have any alignment requirements - // so that any byffer received from the network can be cast + // one purpose is to not have any alignment requirements + // so that any buffer received from the network can be cast // to it and read as an integer of various sizes without // triggering a bus error. The other purpose is to convert // from network byte order to host byte order when read and diff --git a/src/torrent_peer.cpp b/src/torrent_peer.cpp index 705541cf2..338d2871d 100644 --- a/src/torrent_peer.cpp +++ b/src/torrent_peer.cpp @@ -159,7 +159,7 @@ namespace libtorrent , source(src) #if !defined(TORRENT_DISABLE_ENCRYPTION) && !defined(TORRENT_DISABLE_EXTENSIONS) // assume no support in order to - // prefer opening non-encrypyed + // prefer opening non-encrypted // connections. If it fails, we'll // retry with encryption , pe_support(false) diff --git a/src/utp_stream.cpp b/src/utp_stream.cpp index 24532b2a3..5d28201dc 100644 --- a/src/utp_stream.cpp +++ b/src/utp_stream.cpp @@ -65,9 +65,7 @@ static struct utp_logger FILE* utp_log_file; mutex utp_log_mutex; - utp_logger() : utp_log_file(NULL) { - utp_log_file = fopen("utp.log", "w+"); - } + utp_logger() : utp_log_file(NULL) {} ~utp_logger() { if (utp_log_file) fclose(utp_log_file); @@ -504,7 +502,7 @@ public: // this is what we'll send back boost::uint32_t m_reply_micro; - // this is the advertized receive window the other end sent + // this is the advertised receive window the other end sent // we'll never have more un-acked bytes in flight // if this ever gets set to zero, we'll try one packet every // second until the window opens up again @@ -618,7 +616,7 @@ public: // this is a counter of how many times the current m_acked_seq_nr // has been ACKed. If it's ACKed more than 3 times, we assume the // packet with the next sequence number has been lost, and we trigger - // a re-send. Ovbiously an ACK only counts as a duplicate as long as + // a re-send. Obviously an ACK only counts as a duplicate as long as // we have outstanding packets following it. boost::uint8_t m_duplicate_acks; @@ -680,7 +678,7 @@ public: // this is true while the socket is in slow start mode. It's // only in slow-start during the start-up phase. Slow start // (contrary to what its name suggest) means that we're growing - // the congestion window (cwnd) exponetially rather than linearly. + // the congestion window (cwnd) exponentially rather than linearly. // this is done at startup of a socket in order to find its // link capacity faster. This behaves similar to TCP slow start bool m_slow_start:1;