Skip to content
Snippets Groups Projects
Commit 2fc3b216 authored by Julien Michel's avatar Julien Michel
Browse files

MRG

parents 9e5d556b af3564e0
Branches
Tags
No related merge requests found
......@@ -91,6 +91,11 @@ private:
*/
bool GetGdalReadImageFileName( const std::string & filename, std::string & GdalFileName );
// This is a dummy function to prevent curl from writing data to disk
// when testing http adresses
static size_t curlDummyWriteFunction(void*,size_t,size_t nmemb,void*);
ImageFileReader(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
......
......@@ -43,12 +43,6 @@
#ifdef OTB_USE_CURL
#include "curl/curl.h"
// This is a dummy function to prevent curl from writing data to disk
// when testing http adresses
size_t curlDummyWriteFunction(void*,size_t,size_t nmemb,void*)
{
return nmemb;
}
#endif
namespace otb
......@@ -474,7 +468,7 @@ ImageFileReader<TOutputImage>
curl_easy_setopt(curl, CURLOPT_USERAGENT, browser.data());
curl_easy_setopt(curl, CURLOPT_URL,this->m_FileName.data());
// Set the dummy write function
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,&curlDummyWriteFunction);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,&Self::curlDummyWriteFunction);
curl_easy_setopt(curl, CURLOPT_MAXFILESIZE,1);
// Perform requet
......@@ -609,6 +603,13 @@ ImageFileReader<TOutputImage>
otbMsgDevMacro(<<"fic_trouve : "<<fic_trouve);
return( fic_trouve );
}
template <class TOutputImage>
size_t
ImageFileReader<TOutputImage>
::curlDummyWriteFunction(void*,size_t,size_t nmemb,void*)
{
return nmemb;
}
} //namespace otb
......
......@@ -289,7 +289,6 @@ void TileMapImageIO::InternalRead(double x, double y, void* buffer)
}
void TileMapImageIO::BuildFileName(const std::ostringstream& quad, std::ostringstream& filename) const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment