From be44f3a7369fb896b372f7e0286b428e4e66bac9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 23 Mar 2006 11:04:43 +0000 Subject: [PATCH] * main.cc: corrected addCommand. --- ChangeLog | 1 + src/main.cc | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3d799dd..47994cde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ * PendingMessage.cc: make HAVE messages sent only when peer does not have the piece. * Peer.{h,cc}: added hasPiece(int index). + * main.cc: corrected addCommand. 2006-03-22 Tatsuhiro Tsujikawa diff --git a/src/main.cc b/src/main.cc index 403ff9ea..7fd0d4a6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -96,7 +96,7 @@ void torrentHandler(int signal) { exit(0); } -void addCommand(int cuid, const char* url, string referer, Requests requests) { +void addCommand(int cuid, const char* url, string referer, Requests& requests) { Request* req = new Request(); req->setReferer(referer); if(req->setUrl(url)) { @@ -539,7 +539,6 @@ int main(int argc, char* argv[]) { } else { printDownloadAbortMessage(); } - for_each(requests.begin(), requests.end(), clearRequest); requests.clear();