Skip to content

Commit

Permalink
mErrorBuffer memset patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbarrette committed Aug 26, 2007
1 parent d750068 commit 5e01b67
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Changes from version 0.7.0-pre1 to 0.7.1-pre2
Changes from version 0.7.0-pre1 to 0.7.1
- mErrorBuffer memset problem fixed
Graziano Giuliani
- Fixed HttpPost problem (https://www.rrette.com/pipermail/curlpp/2007-February/000273.html)
(Thanks to Gazi Alankus)

Expand Down
3 changes: 3 additions & 0 deletions curlpp/CurlHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ void cURLpp::CurlHandle::perform()
void cURLpp::CurlHandle::reset()
{
curl_easy_reset( mCurl );
memset(mErrorBuffer,0,CURL_ERROR_SIZE + 1);
errorBuffer( mErrorBuffer );
}

CURL *
Expand All @@ -53,6 +55,7 @@ cURLpp::CurlHandle::getHandle() const
cURLpp::CurlHandle::CurlHandle()
: mException(NULL)
{
memset(mErrorBuffer,0,CURL_ERROR_SIZE + 1);
mCurl = curl_easy_init();
runtimeAssert( "Error when trying to curl_easy_init() a handle", mCurl );
errorBuffer( mErrorBuffer );
Expand Down
4 changes: 2 additions & 2 deletions curlpp/OptionList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ cURLpp::OptionList::setOpt( const cURLpp::OptionBase &option )


void
cURLpp::OptionList::getOpt(cURLpp::OptionBase *option)
cURLpp::OptionList::getOpt(cURLpp::OptionBase *option) const
{
mapType::iterator pos = mOptions.find(option->getOption());
mapType::const_iterator pos = mOptions.find(option->getOption());
if( pos != mOptions.end() )
{
option->updateMeToOption((*(*pos).second));
Expand Down
2 changes: 1 addition & 1 deletion curlpp/OptionList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace cURLpp
* OptionBase. Note that if the option is not set, the option passed in
* parameter will be cleared. (See Option::getOpt for more details)
*/
virtual void getOpt(OptionBase *option);
virtual void getOpt(OptionBase *option) const;

/**
* all the options contained by the class will be deleted and we will
Expand Down
4 changes: 2 additions & 2 deletions curlpp/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace cURLpp
typedef boost::function4< int, double, double, double, double > BoostProgressFunction;
#endif

};
};
}
}

#endif

0 comments on commit 5e01b67

Please sign in to comment.