mirror of https://github.com/vitalif/grive2
Initialize mMaxUpload/mMaxDownload to 0 (fix #81)
parent
2727160257
commit
fbf8f1663f
|
@ -25,6 +25,11 @@ namespace gr {
|
||||||
|
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
|
Agent::Agent()
|
||||||
|
{
|
||||||
|
mMaxUpload = mMaxDownload = 0;
|
||||||
|
}
|
||||||
|
|
||||||
long Agent::Put(
|
long Agent::Put(
|
||||||
const std::string& url,
|
const std::string& url,
|
||||||
const std::string& data,
|
const std::string& data,
|
||||||
|
|
|
@ -38,6 +38,7 @@ protected:
|
||||||
unsigned mMaxUpload, mMaxDownload ;
|
unsigned mMaxUpload, mMaxDownload ;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
|
Agent() ;
|
||||||
virtual ~Agent() {}
|
virtual ~Agent() {}
|
||||||
|
|
||||||
virtual ResponseLog* GetLog() const = 0 ;
|
virtual ResponseLog* GetLog() const = 0 ;
|
||||||
|
|
|
@ -72,7 +72,7 @@ struct CurlAgent::Impl
|
||||||
|
|
||||||
static struct curl_slist* SetHeader( CURL* handle, const Header& hdr );
|
static struct curl_slist* SetHeader( CURL* handle, const Header& hdr );
|
||||||
|
|
||||||
CurlAgent::CurlAgent() :
|
CurlAgent::CurlAgent() : Agent(),
|
||||||
m_pimpl( new Impl )
|
m_pimpl( new Impl )
|
||||||
{
|
{
|
||||||
m_pimpl->curl = ::curl_easy_init();
|
m_pimpl->curl = ::curl_easy_init();
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace gr {
|
||||||
using namespace http ;
|
using namespace http ;
|
||||||
|
|
||||||
AuthAgent::AuthAgent( OAuth2& auth, Agent *real_agent ) :
|
AuthAgent::AuthAgent( OAuth2& auth, Agent *real_agent ) :
|
||||||
|
Agent(),
|
||||||
m_auth ( auth ),
|
m_auth ( auth ),
|
||||||
m_agent ( real_agent )
|
m_agent ( real_agent )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue