Fixes issue #205

when s3fs is linked against libcurl < 7.20.0 we'd receive CURLM_CALL_MULTI_PERFORM



git-svn-id: http://s3fs.googlecode.com/svn/trunk@358 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ben.lemasurier@gmail.com 2011-07-29 20:03:38 +00:00
parent 07baba972a
commit b41f982d59

View File

@ -2531,14 +2531,20 @@ static int s3fs_readdir(
// Start making requests.
int still_running = 0;
curlm_code = curl_multi_perform(mh, &still_running);
do {
curlm_code = curl_multi_perform(mh, &still_running);
} while(curlm_code == CURLM_CALL_MULTI_PERFORM);
if(curlm_code != CURLM_OK) {
syslog(LOG_ERR, "readdir: curl_multi_perform code: %d msg: %s",
curlm_code, curl_multi_strerror(curlm_code));
}
while(still_running) {
curlm_code = curl_multi_perform(mh, &still_running);
do {
curlm_code = curl_multi_perform(mh, &still_running);
} while(curlm_code == CURLM_CALL_MULTI_PERFORM);
if(curlm_code != CURLM_OK) {
syslog(LOG_ERR, "s3fs_readdir: curl_multi_perform code: %d msg: %s",
curlm_code, curl_multi_strerror(curlm_code));