Fix login bug

This commit is contained in:
Sude 2013-10-20 02:17:55 +03:00
parent 4584b81a4b
commit 359df14b4a
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,6 @@ API::API(const std::string& token, const std::string& secret)
curl_easy_setopt(curlhandle, CURLOPT_FAILONERROR, true);
this->error = false;
this->getAPIConfig();
this->config.oauth_token = token;
this->config.oauth_secret = secret;
}
@ -51,6 +50,7 @@ API::API(const std::string& token, const std::string& secret)
int API::init()
{
int res = 0;
this->getAPIConfig();
// Check if we already have token and secret
if (!this->config.oauth_token.empty() && !this->config.oauth_secret.empty())

View File

@ -71,7 +71,8 @@ int Downloader::init()
progressbar = new ProgressBar(!config.bNoUnicode, !config.bNoColor);
if (config.bLogin || !gogAPI->init())
bool bInitOK = gogAPI->init();
if (config.bLogin || !bInitOK)
return this->login();
if (!config.bNoCover && config.bDownload && !config.bUpdateCheck)