Another checkpoint

git-svn-id: http://s3fs.googlecode.com/svn/trunk@303 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
mooredan@suncup.net 2011-01-21 00:50:55 +00:00
parent 8e4c89fdec
commit a5e7745589

View File

@ -1402,8 +1402,7 @@ static int put_local_fd_big_file(const char* path, headers_t meta, int fd) {
struct BodyStruct header; struct BodyStruct header;
string ETag; string ETag;
int result; int result;
unsigned long lSize; off_t lSize;
// long lSize;
int partfd = -1; int partfd = -1;
FILE* pSourceFile; FILE* pSourceFile;
FILE* pPartFile; FILE* pPartFile;
@ -1602,22 +1601,23 @@ static int put_local_fd_big_file(const char* path, headers_t meta, int fd) {
// error check this // error check this
fseek (pSourceFile , 0 , SEEK_END); // fseek (pSourceFile , 0 , SEEK_END);
lSize = ftell (pSourceFile); // lSize = (off_t) ftell (pSourceFile);
rewind (pSourceFile); // rewind (pSourceFile);
// Does is match stat's info? // Does is match stat's info?
if (lSize != st.st_size) { // if (lSize != st.st_size) {
syslog(LOG_ERR, "%d ### Sizes do not match lSize: %lu st_size: %lu\n", __LINE__, // syslog(LOG_ERR, "%d ### Sizes do not match lSize: %llu st_size: %llu\n", __LINE__,
lSize, (unsigned long)st.st_size); // lSize, st.st_size);
// if(pSourceFile != NULL) fclose(pSourceFile); // if(pSourceFile != NULL) fclose(pSourceFile);
// return(-EIO); // return(-EIO);
} // }
// printf("lSize: %i\n", lSize); // printf("lSize: %i\n", lSize);
// printf("st_size: %i\n", st.st_size); // printf("st_size: %i\n", st.st_size);
lSize = (unsigned long)st.st_size; // lSize = (unsigned long)st.st_size;
lSize = st.st_size;
lBufferSize = 0; lBufferSize = 0;
partNumber = 0; partNumber = 0;