summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-05-21 12:22:04 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-05-21 12:22:04 +0000
commit47adbe618c85b437220588fa1f7d602e113f7875 (patch)
treeeab4b692e42875ddd2904570d87cce6d54de5b50 /src/DownloadEngine.h
parent8f3cdfb2de7b63533fe95e5a5c24374105842784 (diff)
2010-05-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FTP download may fail when control connection is reused. This happens because FTP server can offer different root directory for different account. If pooled connections has different root directory, then download will fail. * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpConnection.cc * src/FtpConnection.h * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc
Diffstat (limited to 'src/DownloadEngine.h')
-rw-r--r--src/DownloadEngine.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h
index b29adca5..14da2b90 100644
--- a/src/DownloadEngine.h
+++ b/src/DownloadEngine.h
@@ -98,6 +98,9 @@ private:
const std::map<std::string, std::string>& option,
time_t timeout);
+ SocketPoolEntry(const SharedHandle<SocketCore>& socket,
+ time_t timeout);
+
~SocketPoolEntry();
bool isTimeout() const;
@@ -151,6 +154,16 @@ private:
uint16_t port,
const SocketPoolEntry& entry);
+ void poolSocket(const std::string& ipaddr, uint16_t port,
+ const std::string& username,
+ const SharedHandle<SocketCore>& sock,
+ const std::map<std::string, std::string>& options,
+ time_t timeout);
+
+ void poolSocket(const std::string& ipaddr, uint16_t port,
+ const SharedHandle<SocketCore>& sock,
+ time_t timeout);
+
std::multimap<std::string, SocketPoolEntry>::iterator
findSocketPoolEntry(const std::string& ipaddr, uint16_t port);
public:
@@ -202,17 +215,9 @@ public:
void addRoutineCommand(Command* command);
- void poolSocket(const std::string& ipaddr, uint16_t port,
- const SharedHandle<SocketCore>& sock,
- const std::map<std::string, std::string>& options,
- time_t timeout = 15);
-
- void poolSocket(const std::string& ipaddr, uint16_t port,
- const SharedHandle<SocketCore>& sock,
- time_t timeout = 15);
-
void poolSocket(const SharedHandle<Request>& request,
bool proxyDefined,
+ const std::string& username,
const SharedHandle<SocketCore>& socket,
const std::map<std::string, std::string>& options,
time_t timeout = 15);
@@ -228,7 +233,8 @@ public:
SharedHandle<SocketCore> popPooledSocket
(std::map<std::string, std::string>& options,
const std::string& ipaddr,
- uint16_t port);
+ uint16_t port,
+ const std::string& username);
SharedHandle<SocketCore>
popPooledSocket(const std::vector<std::string>& ipaddrs, uint16_t port);
@@ -237,7 +243,8 @@ public:
popPooledSocket
(std::map<std::string, std::string>& options,
const std::vector<std::string>& ipaddrs,
- uint16_t port);
+ uint16_t port,
+ const std::string& username);
const SharedHandle<CookieStorage>& getCookieStorage() const
{