* Use HashString for hash and id which contains the 20 byte array

directly, instead of using std::string.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@799 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-10-31 11:20:31 +00:00
parent c9d8a2406d
commit 9d465de7e1
11 changed files with 46 additions and 21 deletions
+7 -5
View File
@@ -107,7 +107,7 @@ receive_tracker_dump(const std::string& url, const char* data, size_t size) {
}
void
Manager::handshake_log(const sockaddr* sa, torrent::ConnectionManager::HandshakeMessage msg, int err, std::string hash) {
Manager::handshake_log(const sockaddr* sa, torrent::ConnectionManager::HandshakeMessage msg, int err, const torrent::HashString* hash) {
if (!control->variable()->get_value("handshake_log"))
return;
@@ -115,6 +115,7 @@ Manager::handshake_log(const sockaddr* sa, torrent::ConnectionManager::Handshake
std::string download;
const rak::socket_address* socketAddress = rak::socket_address::cast_from(sa);
if (socketAddress->is_valid()) {
char port[6];
snprintf(port, sizeof(port), "%d", socketAddress->port());
@@ -123,10 +124,11 @@ Manager::handshake_log(const sockaddr* sa, torrent::ConnectionManager::Handshake
peer = "(unknown)";
}
torrent::Download d = torrent::download_find(hash);
if (d.is_valid())
download = ": " + d.name();
else
// torrent::Download d = torrent::download_find(hash);
// if (d.is_valid())
// download = ": " + d.name();
// else
download = "";
switch (msg) {