*** empty log message ***
This commit is contained in:
parent
43997c41fd
commit
82f5f056ea
|
@ -44,10 +44,10 @@ namespace libtorrent
|
|||
|
||||
class big_number
|
||||
{
|
||||
// private type
|
||||
// private type
|
||||
struct private_pointer {};
|
||||
// the number of bytes of the number
|
||||
enum { number_size = 20 };
|
||||
// the number of bytes of the number
|
||||
enum { number_size = 20 };
|
||||
public:
|
||||
|
||||
big_number() {}
|
||||
|
|
|
@ -189,7 +189,8 @@ namespace libtorrent
|
|||
{
|
||||
peer_id::const_iterator PID = p.begin();
|
||||
boost::optional<fingerprint> f;
|
||||
|
||||
|
||||
if (p.is_all_zeros()) return "Unkown";
|
||||
|
||||
// look for azureus style id
|
||||
f = parse_az_style(p);
|
||||
|
@ -248,6 +249,10 @@ namespace libtorrent
|
|||
if (std::equal(f->id, f->id+1, "S"))
|
||||
identity << "Shadow ";
|
||||
|
||||
// ABC
|
||||
if (std::equal(f->id, f->id+1, "A"))
|
||||
identity << "ABC ";
|
||||
|
||||
// UPnP
|
||||
else if (std::equal(f->id, f->id+1, "U"))
|
||||
identity << "UPnP ";
|
||||
|
|
|
@ -1838,13 +1838,10 @@ namespace libtorrent
|
|||
#ifndef NDEBUG
|
||||
(*m_logger) << " protocol length: " << m_packet_size << "\n";
|
||||
#endif
|
||||
if (m_packet_size != 19 && m_packet_size != 7)
|
||||
if (m_packet_size > 100 || m_packet_size <= 0)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
(*m_logger) << "incorrect protocol length\n";
|
||||
#endif
|
||||
std::stringstream s;
|
||||
s << "received incorrect protocol length ("
|
||||
s << "incorrect protocol length ("
|
||||
<< m_packet_size
|
||||
<< ") should be 19.";
|
||||
throw protocol_error(s.str());
|
||||
|
|
Loading…
Reference in New Issue