Merge pull request #440 from ggtakec/master

Handled all curl error without exiting process - #437
This commit is contained in:
Takeshi Nakatani 2016-06-27 20:04:29 +09:00 committed by GitHub
commit 676b2090fb

View File

@ -1998,13 +1998,13 @@ int S3fsCurl::RequestPerform(void)
// option and continue // option and continue
if(0 == S3fsCurl::curl_ca_bundle.size()){ if(0 == S3fsCurl::curl_ca_bundle.size()){
if(!S3fsCurl::LocateBundle()){ if(!S3fsCurl::LocateBundle()){
S3FS_PRN_CRIT("could not get CURL_CA_BUNDLE."); S3FS_PRN_ERR("could not get CURL_CA_BUNDLE.");
exit(EXIT_FAILURE); return -EIO;
} }
break; // retry with CAINFO break; // retry with CAINFO
} }
S3FS_PRN_CRIT("curlCode: %d msg: %s", curlCode, curl_easy_strerror(curlCode)); S3FS_PRN_ERR("curlCode: %d msg: %s", curlCode, curl_easy_strerror(curlCode));
exit(EXIT_FAILURE); return -EIO;
break; break;
#ifdef CURLE_PEER_FAILED_VERIFICATION #ifdef CURLE_PEER_FAILED_VERIFICATION
@ -2021,7 +2021,7 @@ int S3fsCurl::RequestPerform(void)
}else{ }else{
S3FS_PRN_INFO("my_curl_easy_perform: curlCode: %d -- %s", curlCode, curl_easy_strerror(curlCode)); S3FS_PRN_INFO("my_curl_easy_perform: curlCode: %d -- %s", curlCode, curl_easy_strerror(curlCode));
} }
exit(EXIT_FAILURE); return -EIO;
break; break;
#endif #endif
@ -2045,8 +2045,8 @@ int S3fsCurl::RequestPerform(void)
// Unknown CURL return code // Unknown CURL return code
default: default:
S3FS_PRN_CRIT("###curlCode: %d msg: %s", curlCode, curl_easy_strerror(curlCode)); S3FS_PRN_ERR("###curlCode: %d msg: %s", curlCode, curl_easy_strerror(curlCode));
exit(EXIT_FAILURE); return -EIO;
break; break;
} }
S3FS_PRN_INFO("### retrying..."); S3FS_PRN_INFO("### retrying...");