Skip to content

Commit 2089a60

Browse files
committed
removed the uncessary lines from fileTransferService.cpp
1 parent 5dab401 commit 2089a60

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

curlFileTransfer/src/fileTransferService.cpp

-33
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ size_t curlFileTransfer::WriteCallback(void* contents, size_t size, size_t nmemb
4242

4343
bool curlFileTransfer::isDataServerAvailable(const std::string& url) {
4444

45-
// ORDINAL values are used
46-
//CurlEasyInitFunc curl_easy_init = (CurlEasyInitFunc)(GetProcAddress(hCurlLib, "curl_easy_init"));
47-
//CurlEasyCleanupFunc curl_easy_cleanup = (CurlEasyCleanupFunc)(GetProcAddress(hCurlLib, "curl_easy_cleanup"));
48-
//CurlEasySetoptFunc curl_easy_setopt = (CurlEasySetoptFunc)(GetProcAddress(hCurlLib, "curl_easy_setopt"));
49-
//CurlEasyPerformFunc curl_easy_perform = (CurlEasyPerformFunc)(GetProcAddress(hCurlLib, "curl_easy_perform"));
50-
//CurlEasyGetinfoFunc curl_easy_getinfo = (CurlEasyGetinfoFunc)(GetProcAddress(hCurlLib, MAKEINTRESOURCEA(4)));
51-
//if (!curl_easy_init || !curl_easy_cleanup || !curl_easy_setopt || !curl_easy_perform || !curl_easy_getinfo) {
52-
// return false;
53-
//}
54-
5545
CURL* curl = curl_easy_init();
5646
if (!curl) {
5747
// std::cerr << "Curl initialization failed." << std::endl;
@@ -79,16 +69,6 @@ bool curlFileTransfer::isDataServerAvailable(const std::string& url) {
7969

8070
bool curlFileTransfer::DownloadFileFromURL(const std::wstring &url, const std::wstring &destDirPath, std::wstring &errorMsg) {
8171

82-
//CurlEasyInitFunc curl_easy_init = (CurlEasyInitFunc)(GetProcAddress(hCurlLib, "curl_easy_init"));
83-
//CurlEasyCleanupFunc curl_easy_cleanup = (CurlEasyCleanupFunc)(GetProcAddress(hCurlLib, "curl_easy_cleanup"));
84-
//CurlEasySetoptFunc curl_easy_setopt = (CurlEasySetoptFunc)(GetProcAddress(hCurlLib, "curl_easy_setopt"));
85-
//CurlEasyPerformFunc curl_easy_perform = (CurlEasyPerformFunc)(GetProcAddress(hCurlLib, "curl_easy_perform"));
86-
//CurlEasyStrerrorFunc curl_easy_strerror = (CurlEasyStrerrorFunc)(GetProcAddress(hCurlLib, "curl_easy_strerror"));
87-
//if (!curl_easy_init || !curl_easy_cleanup || !curl_easy_setopt || !curl_easy_perform || !curl_easy_strerror) {
88-
// errorMsg = L"Failed to get function pointers from libcurl.dll";
89-
// return false;
90-
//}
91-
9272
CURL* curl = curl_easy_init();
9373
if (!curl) {
9474
errorMsg = L"Failed to initialize libcurl";
@@ -138,19 +118,6 @@ bool curlFileTransfer::UploadFileToURL(const std::wstring &url, const std::wstri
138118
std::wstring filename = extractFilename(filePath);
139119
std::string filenameUtf8 = StringUtils::convertWStringToUTF8(filename);
140120

141-
142-
//CurlEasyInitFunc curl_easy_init = (CurlEasyInitFunc)(GetProcAddress(hCurlLib, "curl_easy_init"));
143-
//CurlEasyCleanupFunc curl_easy_cleanup = (CurlEasyCleanupFunc)(GetProcAddress(hCurlLib, "curl_easy_cleanup"));
144-
//CurlEasySetoptFunc curl_easy_setopt = (CurlEasySetoptFunc)(GetProcAddress(hCurlLib, "curl_easy_setopt"));
145-
//CurlEasyPerformFunc curl_easy_perform = (CurlEasyPerformFunc)(GetProcAddress(hCurlLib, "curl_easy_perform"));
146-
//CurlEasyStrerrorFunc curl_easy_strerror = (CurlEasyStrerrorFunc)(GetProcAddress(hCurlLib, "curl_easy_strerror"));
147-
//CurlFormFreeFunc curl_formfree = (CurlFormFreeFunc)(GetProcAddress(hCurlLib, "curl_formfree"));
148-
//CurlFormAddFunc curl_formadd = (CurlFormAddFunc)(GetProcAddress(hCurlLib, "curl_formadd"));
149-
150-
//if (!curl_easy_init || !curl_easy_cleanup || !curl_easy_setopt || !curl_easy_perform || !curl_easy_strerror || !curl_formfree || !curl_formadd) {
151-
// errorMsg = L"Failed to get function pointers from libcurl.dll";
152-
// return false;
153-
//}
154121
CURL* curl = curl_easy_init();
155122
if (!curl) {
156123
errorMsg = L"Failed to initialize libcurl";

0 commit comments

Comments
 (0)