projects
/
cs-p2p-next.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c8b534
)
instrumentation/hrktorrent: sized peers vector; fix iterator update
author
P2P-Next
<p2p-next@cs.pub.ro>
Thu, 12 Aug 2010 15:21:27 +0000
(18:21 +0300)
committer
P2P-Next
<p2p-next@cs.pub.ro>
Thu, 12 Aug 2010 15:21:27 +0000
(18:21 +0300)
instrumentation/hrktorrent/core.cpp
patch
|
blob
|
history
diff --git
a/instrumentation/hrktorrent/core.cpp
b/instrumentation/hrktorrent/core.cpp
index
e5de712
..
159e05c
100644
(file)
--- a/
instrumentation/hrktorrent/core.cpp
+++ b/
instrumentation/hrktorrent/core.cpp
@@
-81,6
+81,7
@@
CCore::StatusLoop(void* data)
\r
/* peer_info array for storing peer-specific information */
\r
std::vector<libtorrent::peer_info> peers;
\r
+ peers.resize(100);
\r
\r
stdout_is_tty = (isatty(STDOUT_FILENO) == 1);
\r
if (stdout_is_tty) {
\r
@@
-149,6
+150,7
@@
CCore::StatusLoop(void* data)
std::vector<libtorrent::peer_info>::iterator it = peers.begin();
\r
while (it != peers.end()) {
\r
std::cout << it->ip << std::endl;
\r
+ it++;
\r
}
\r
\r
sleep(1);
\r