mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Fixed typos (thx zzz)
This commit is contained in:
parent
c10d0fdb7e
commit
8434863beb
@ -60,8 +60,8 @@ std::string I2PControlSession::Response::getErrorMsg() const
|
|||||||
return "Invalid password.";
|
return "Invalid password.";
|
||||||
case ErrorCode::NoToken:
|
case ErrorCode::NoToken:
|
||||||
return "No authentication token given.";
|
return "No authentication token given.";
|
||||||
case ErrorCode::NonexistantToken:
|
case ErrorCode::NonexistentToken:
|
||||||
return "Nonexistant authentication token given.";
|
return "Nonexistent authentication token given.";
|
||||||
case ErrorCode::ExpiredToken:
|
case ErrorCode::ExpiredToken:
|
||||||
return "Exipred authentication token given.";
|
return "Exipred authentication token given.";
|
||||||
case ErrorCode::UnspecifiedVersion:
|
case ErrorCode::UnspecifiedVersion:
|
||||||
@ -182,7 +182,7 @@ bool I2PControlSession::authenticate(const PropertyTree& pt, Response& response)
|
|||||||
std::lock_guard<std::mutex> lock(tokensMutex);
|
std::lock_guard<std::mutex> lock(tokensMutex);
|
||||||
auto it = tokens.find(token);
|
auto it = tokens.find(token);
|
||||||
if(it == tokens.end()) {
|
if(it == tokens.end()) {
|
||||||
response.setError(ErrorCode::NonexistantToken);
|
response.setError(ErrorCode::NonexistentToken);
|
||||||
return false;
|
return false;
|
||||||
} else if(util::GetSecondsSinceEpoch() - it->second > I2P_CONTROL_TOKEN_LIFETIME) {
|
} else if(util::GetSecondsSinceEpoch() - it->second > I2P_CONTROL_TOKEN_LIFETIME) {
|
||||||
response.setError(ErrorCode::ExpiredToken);
|
response.setError(ErrorCode::ExpiredToken);
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
// I2PControl specific
|
// I2PControl specific
|
||||||
InvalidPassword = 32001,
|
InvalidPassword = 32001,
|
||||||
NoToken = 32002,
|
NoToken = 32002,
|
||||||
NonexistantToken = 32003,
|
NonexistentToken = 32003,
|
||||||
ExpiredToken = 32004,
|
ExpiredToken = 32004,
|
||||||
UnspecifiedVersion = 32005,
|
UnspecifiedVersion = 32005,
|
||||||
UnsupportedVersion = 32006
|
UnsupportedVersion = 32006
|
||||||
|
Loading…
Reference in New Issue
Block a user