From 3293bf9b6e5e2eef414ed6c5649094e9d6f9a7c0 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 13 Apr 2007 00:22:03 +0000 Subject: [PATCH] the seed flag in the peer struct is updated when connected to a seed (will avoid trying to reconnect to a seed when we're also a seed) --- src/peer_connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index a9347a481..949f9fbfd 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -286,6 +286,8 @@ namespace libtorrent #ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << " *** THIS IS A SEED ***\n"; #endif + assert(m_peer_info); + m_peer_info->seed = true; // if we're a seed too, disconnect if (t->is_seed()) { @@ -722,6 +724,8 @@ namespace libtorrent if (is_seed()) { + assert(m_peer_info); + m_peer_info->seed = true; t->get_policy().set_seed(*this); if (t->is_seed()) { @@ -810,6 +814,8 @@ namespace libtorrent #ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << " *** THIS IS A SEED ***\n"; #endif + assert(m_peer_info); + m_peer_info->seed = true; t->get_policy().set_seed(*this); // if we're a seed too, disconnect if (t->is_seed())