merged changes from RC_1_0

This commit is contained in:
Arvid Norberg 2014-08-18 23:05:10 +00:00
parent 166528747d
commit 9f8916a7a0
3 changed files with 9 additions and 6 deletions

View File

@ -27,6 +27,7 @@
* almost completely changed the storage interface (for custom storage)
* added support for hashing pieces in multiple threads
* fixed uTP upload performance issue
* fix missing support for DHT put salt
1.0.1 release

View File

@ -284,12 +284,12 @@ some additional error codes.
+------------+-----------------------------+
| error-code | description |
+============+=============================+
| 205 | message (i.e. ``v`` field) |
| 205 | message (``v`` field) |
| | too big. |
+------------+-----------------------------+
| 206 | invalid signature |
+------------+-----------------------------+
| 207 | salt (i.e. ``salt`` field) |
| 207 | salt (``salt`` field) |
| | too big. |
+------------+-----------------------------+
| 301 | the CAS hash mismatched, |
@ -362,7 +362,7 @@ and verification of the value and sequence number should be done as follows:
On the storage node, the signature MUST be verified before accepting the store
command. The data MUST be stored under the SHA-1 hash of the public key (as it
appears in the bencoded dict).
appears in the bencoded dict) and the salt (if present).
On the requesting nodes, the key they get back from a ``get`` request MUST be
verified to hash to the target ID the lookup was made for, as well as verifying

View File

@ -77,7 +77,7 @@ void utp_log(char const* fmt, ...)
{
mutex::scoped_lock lock(log_file_holder.utp_log_mutex);
static ptime start = time_now_hires();
fprintf(log_file_holder.utp_log_file, "[%012"PRId64"] ", total_microseconds(time_now_hires() - start));
fprintf(log_file_holder.utp_log_file, "[%012" PRId64 "] ", total_microseconds(time_now_hires() - start));
va_list l;
va_start(l, fmt);
vfprintf(log_file_holder.utp_log_file, fmt, l);
@ -3212,7 +3212,7 @@ void utp_socket_impl::do_ledbat(int acked_bytes, int delay, int in_flight)
// true if the upper layer is pushing enough data down the socket to be
// limited by the cwnd. If this is not the case, we should not adjust cwnd.
bool cwnd_saturated = (m_bytes_in_flight + acked_bytes + m_mtu > (m_cwnd << 16));
bool cwnd_saturated = (m_bytes_in_flight + acked_bytes + m_mtu > (m_cwnd >> 16));
// all of these are fixed points with 16 bits fraction portion
boost::int64_t window_factor = (boost::int64_t(acked_bytes) << 16) / in_flight;
@ -3221,7 +3221,9 @@ void utp_socket_impl::do_ledbat(int acked_bytes, int delay, int in_flight)
if (delay >= target_delay)
{
UTP_LOGV("%8p: off_target: %d slow_start -> 0\n", this, target_delay - delay);
if (m_slow_start)
UTP_LOGV("%8p: off_target: %d slow_start -> 0\n", this, target_delay - delay);
m_sm->inc_stats_counter(counters::utp_samples_above_target);
m_slow_start = false;
}