mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-11 00:29:22 +00:00
* Piece request messages didn't get read when they were the only
message in the buffer, it required an additional byte beyond the size of the request body. * More work on ClientInfo. * Bound 'k' to disconnecting a peer. Consider a better key. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@647 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -130,6 +130,19 @@ split_iterator(__UNUSED const Sequence& seq) {
|
||||
return split_iterator_t<Sequence>();
|
||||
}
|
||||
|
||||
// Could optimize this abit.
|
||||
inline char
|
||||
hexchar_to_value(char c) {
|
||||
if (c >= '0' && c <= '9')
|
||||
return c - '0';
|
||||
|
||||
else if (c >= 'A' && c <= 'F')
|
||||
return 10 + c - 'A';
|
||||
|
||||
else
|
||||
return 10 + c - 'a';
|
||||
}
|
||||
|
||||
template <int pos, typename Value>
|
||||
inline char
|
||||
value_to_hexchar(Value v) {
|
||||
|
||||
Reference in New Issue
Block a user