diff --git a/src/curl.cpp b/src/curl.cpp index 127ce8ee05..ce96cc605b 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -87,9 +87,6 @@ constexpr char S3fsCurl::S3FS_SSL_PRIVKEY_PASSWORD[]; pthread_mutex_t S3fsCurl::curl_warnings_lock; pthread_mutex_t S3fsCurl::curl_handles_lock; //TEST -pthread_mutex_t S3fsCurl::test_lock; -//TEST -//TEST //S3fsCurl::callback_locks_t S3fsCurl::callback_locks; pthread_mutex_t S3fsCurl::callback_locks[CURL_LOCK_DATA_LAST]; //TEST @@ -161,11 +158,6 @@ bool S3fsCurl::InitS3fsCurl() if(0 != pthread_mutex_init(&S3fsCurl::curl_handles_lock, &attr)){ return false; } -//TEST - if(0 != pthread_mutex_init(&S3fsCurl::test_lock, &attr)){ - return false; - } -//TEST //TEST // if(0 != pthread_mutex_init(&S3fsCurl::callback_locks.dns, &attr)){ // return false; @@ -233,11 +225,6 @@ bool S3fsCurl::DestroyS3fsCurl() return false; } } -//TEST -//TEST - if(0 != pthread_mutex_destroy(&S3fsCurl::test_lock)){ - result = false; - } //TEST if(0 != pthread_mutex_destroy(&S3fsCurl::curl_handles_lock)){ result = false; @@ -2678,16 +2665,6 @@ bool S3fsCurl::RemakeHandle() // int S3fsCurl::RequestPerform(bool dontAddAuthHeaders /*=false*/) { -//TEST - int my_counter; - { - AutoLock lock(&S3fsCurl::test_lock); - - static int common_counter = 0; - my_counter = ++common_counter; - } -//TEST - if(S3fsLog::IsS3fsLogDbg()){ char* ptr_url = nullptr; curl_easy_getinfo(hCurl, CURLINFO_EFFECTIVE_URL , &ptr_url); @@ -2708,41 +2685,23 @@ int S3fsCurl::RequestPerform(bool dontAddAuthHeaders /*=false*/) insertAuthHeaders(); } -//TEST - S3FS_PRN_DBG("++++++++ START : BEFORE SETOPT : PASS (%d)", my_counter); -//TEST if(CURLE_OK != curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders)){ return false; } -//TEST - S3FS_PRN_DBG("++++++++ END : AFTER SETOPT : PASS (%d)", my_counter); -//TEST // Requests -//TEST - S3FS_PRN_DBG("++++++++ START : BEFORE REFORM : PASS (%d)", my_counter); -//TEST curlCode = curl_easy_perform(hCurl); -//TEST - S3FS_PRN_DBG("++++++++ END : AFTER REFORM : PASS (%d)", my_counter); -//TEST // Check result switch(curlCode){ case CURLE_OK: // Need to look at the HTTP response code -//TEST - S3FS_PRN_DBG("++++++++ START : BEFORE GETINFO : PASS (%d)", my_counter); -//TEST if(0 != curl_easy_getinfo(hCurl, CURLINFO_RESPONSE_CODE, &responseCode)){ S3FS_PRN_ERR("curl_easy_getinfo failed while trying to retrieve HTTP response code"); responseCode = S3FSCURL_RESPONSECODE_FATAL_ERROR; result = -EIO; break; } -//TEST - S3FS_PRN_DBG("++++++++ END : AFTER GETINFO : PASS (%d)", my_counter); -//TEST if(responseCode >= 200 && responseCode < 300){ S3FS_PRN_INFO3("HTTP response code %ld", responseCode); result = 0; diff --git a/src/curl.h b/src/curl.h index 3338b32fbe..f82f8dd473 100644 --- a/src/curl.h +++ b/src/curl.h @@ -117,9 +117,6 @@ class S3fsCurl static pthread_mutex_t curl_warnings_lock; static bool curl_warnings_once; // emit older curl warnings only once static pthread_mutex_t curl_handles_lock; -//TEST - static pthread_mutex_t test_lock; -//TEST //TEST // static struct callback_locks_t { // pthread_mutex_t dns;