diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-10-26 00:57:26 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 23:56:29 +0100 |
commit | 47c0bdc310c8cd62374ca6e6bb456dd183bdfc07 (patch) | |
tree | b951a0221dd6015ffef42ebea9dfc709f6053404 /methods/ftp.h | |
parent | 2f6aed72f656494d668918aa8ce4052d7c81e993 (diff) |
report transient errors as transient errors
The Fail method for acquire methods has a boolean parameter indicating
the transient-nature of a reported error. The problem with this is that
Fail is called very late at a point where it is no longer easily
identifiable if an error is indeed transient or not, so some calls were
and some weren't and the acquire system would later mostly ignore the
transient flag and guess by using the FailReason instead.
Introducing a tri-state enum we can pass the information about fatal or
transient errors through the callstack to generate the correct fails.
Diffstat (limited to 'methods/ftp.h')
-rw-r--r-- | methods/ftp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/ftp.h b/methods/ftp.h index 1859ddce0..52b856637 100644 --- a/methods/ftp.h +++ b/methods/ftp.h @@ -43,7 +43,7 @@ class FTPConn // Private helper functions bool ReadLine(std::string &Text); - bool Login(); + ResultState Login(); bool CreateDataFd(); bool Finalize(); @@ -56,7 +56,7 @@ class FTPConn bool WriteMsg(unsigned int &Ret,std::string &Text,const char *Fmt,...); // Connection control - bool Open(aptMethod *Owner); + ResultState Open(aptMethod *Owner); void Close(); bool GoPasv(); bool ExtGoPasv(); |