fix getFileContentEx read bytes

pull/56/merge
yuqing 2017-03-08 15:35:38 +08:00
parent 69c7ea4cb3
commit fa8331340f
3 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,9 @@
Version 5.10 2017-02-17 Version 5.10 2017-03-08
* use fc_safe_read instead of read, and fc_safe_write instead of write * use fc_safe_read instead of read, and fc_safe_write instead of write
you must upgrade libfastcommon to V1.35 or later you must upgrade libfastcommon to V1.35 or later
* fix getFileContentEx read bytes,
you must upgrade libfastcommon to V1.36 or later
Version 5.09 2016-12-29 Version 5.09 2016-12-29
* bug fixed: list_all_groups expand buffer auto for so many groups * bug fixed: list_all_groups expand buffer auto for so many groups

View File

@ -17,13 +17,13 @@ Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id Requires: %__cp %__mv %__chmod %__grep %__mkdir %__install %__id
BuildRequires: libfastcommon-devel >= 1.0.35 BuildRequires: libfastcommon-devel >= 1.0.36
%description %description
This package provides tracker & storage of fastdfs This package provides tracker & storage of fastdfs
%package -n %{FDFSServer} %package -n %{FDFSServer}
Requires: libfastcommon >= 1.0.35 Requires: libfastcommon >= 1.0.36
Summary: fastdfs tracker & storage Summary: fastdfs tracker & storage
%package -n %{FDFSTool} %package -n %{FDFSTool}

View File

@ -1992,7 +1992,7 @@ static int tracker_deal_get_one_sys_file(struct fast_task_info *pTask)
long2buff(file_stat.st_size, p); long2buff(file_stat.st_size, p);
p += FDFS_PROTO_PKG_LEN_SIZE; p += FDFS_PROTO_PKG_LEN_SIZE;
bytes = read_bytes; bytes = read_bytes + 1;
if (read_bytes > 0 && (result=getFileContentEx(full_filename, \ if (read_bytes > 0 && (result=getFileContentEx(full_filename, \
p, offset, &bytes)) != 0) p, offset, &bytes)) != 0)
{ {