potential fix for issue 148

- increase max_keys in readdir from 50 to 500
- handle the curle_couldnt_resolve_host error better
- add the curl forbid reuse option



git-svn-id: http://s3fs.googlecode.com/svn/trunk@308 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
mooredan@suncup.net 2011-02-05 01:35:18 +00:00
parent 850d7b7d47
commit 0a233011a5
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(s3fs, 1.35)
AC_INIT(s3fs, 1.36)
AC_CANONICAL_SYSTEM

View File

@ -189,6 +189,7 @@ CURL *create_curl_handle(void) {
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl_handle, CURLOPT_PROGRESSFUNCTION, my_curl_progress);
curl_easy_setopt(curl_handle, CURLOPT_PROGRESSDATA, curl_handle);
curl_easy_setopt(curl_handle, CURLOPT_FORBID_REUSE, 1);
now = time(0);
curl_times[curl_handle] = now;
curl_progress[curl_handle] = progress_t(-1, -1);
@ -674,6 +675,11 @@ static int my_curl_easy_perform(CURL* curl, BodyStruct* body = NULL, FILE* f = 0
sleep(2);
break;
case CURLE_COULDNT_RESOLVE_HOST:
syslog(LOG_ERR, "### CURLE_COULDNT_RESOLVE_HOST");
sleep(2);
break;
case CURLE_COULDNT_CONNECT:
syslog(LOG_ERR, "### CURLE_COULDNT_CONNECT");
sleep(4);
@ -3174,7 +3180,7 @@ static int s3fs_readdir(
if (NextMarker.size() > 0)
query += "&marker=" + urlEncode(NextMarker);
query += "&max-keys=50";
query += "&max-keys=500";
string url = host + resource + "?" + query;