Skip to content

Commit

Permalink
correct CRC32, you must upgrade libfastcommon to V1.38 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqing committed Jun 7, 2018
1 parent 9757d08 commit af143b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion HISTORY
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

Version 5.12 2018-05-23
Version 5.12 2018-06-07
* code refine for rare case
* replace print format OFF_PRINTF_FORMAT to PRId64
* php_ext fix zend_object_store_get_object call in php5.5
* make.sh uses macros define in /usr/include/fastcommon/_os_define.h
* correct CRC32, you must upgrade libfastcommon to V1.38 or later

Version 5.11 2017-05-26
* bug fixed: file_offset has no effect when use trunk file
Expand Down
4 changes: 2 additions & 2 deletions client/fdfs_crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main(int argc, char *argv[])
int fd;
int read_bytes;
int result;
int crc32;
int64_t crc32;
char buff[512 * 1024];

if (argc < 2)
Expand Down Expand Up @@ -97,7 +97,7 @@ int main(int argc, char *argv[])
if (result == 0)
{
crc32 = CRC32_FINAL(crc32);
printf("%u\n", crc32);
printf("%x\n", (int)crc32);
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion storage/storage_nio.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ typedef struct
bool calc_file_hash; //if calculate file content hash code
int open_flags; //open file flags
int file_hash_codes[4]; //file hash code
int crc32; //file content crc32 signature
int64_t crc32; //file content crc32 signature
MD5_CTX md5_context;

union
Expand Down

0 comments on commit af143b8

Please sign in to comment.