Skip to content

Commit

Permalink
Initialize mMaxUpload/mMaxDownload to 0 (fix Grive#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Jul 6, 2016
1 parent 2727160 commit fbf8f16
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libgrive/src/http/Agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ namespace gr {

namespace http {

Agent::Agent()
{
mMaxUpload = mMaxDownload = 0;
}

long Agent::Put(
const std::string& url,
const std::string& data,
Expand Down
1 change: 1 addition & 0 deletions libgrive/src/http/Agent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected:
unsigned mMaxUpload, mMaxDownload ;

public :
Agent() ;
virtual ~Agent() {}

virtual ResponseLog* GetLog() const = 0 ;
Expand Down
2 changes: 1 addition & 1 deletion libgrive/src/http/CurlAgent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct CurlAgent::Impl

static struct curl_slist* SetHeader( CURL* handle, const Header& hdr );

CurlAgent::CurlAgent() :
CurlAgent::CurlAgent() : Agent(),
m_pimpl( new Impl )
{
m_pimpl->curl = ::curl_easy_init();
Expand Down
1 change: 1 addition & 0 deletions libgrive/src/protocol/AuthAgent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace gr {
using namespace http ;

AuthAgent::AuthAgent( OAuth2& auth, Agent *real_agent ) :
Agent(),
m_auth ( auth ),
m_agent ( real_agent )
{
Expand Down

0 comments on commit fbf8f16

Please sign in to comment.