bug fixed: list_all_groups expand buffer auto
parent
8582785f93
commit
0ea1795cbd
3
HISTORY
3
HISTORY
|
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
Version 5.09 2016-11-10
|
||||||
|
* bug fixed: list_all_groups expand buffer auto
|
||||||
|
|
||||||
Version 5.08 2016-04-08
|
Version 5.08 2016-04-08
|
||||||
* install library to $(TARGET_PREFIX)/lib anyway
|
* install library to $(TARGET_PREFIX)/lib anyway
|
||||||
* php extension compiled in PHP 7
|
* php extension compiled in PHP 7
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
int g_fdfs_connect_timeout = DEFAULT_CONNECT_TIMEOUT;
|
int g_fdfs_connect_timeout = DEFAULT_CONNECT_TIMEOUT;
|
||||||
int g_fdfs_network_timeout = DEFAULT_NETWORK_TIMEOUT;
|
int g_fdfs_network_timeout = DEFAULT_NETWORK_TIMEOUT;
|
||||||
char g_fdfs_base_path[MAX_PATH_SIZE] = {'/', 't', 'm', 'p', '\0'};
|
char g_fdfs_base_path[MAX_PATH_SIZE] = {'/', 't', 'm', 'p', '\0'};
|
||||||
Version g_fdfs_version = {5, 8};
|
Version g_fdfs_version = {5, 9};
|
||||||
bool g_use_connection_pool = false;
|
bool g_use_connection_pool = false;
|
||||||
ConnectionPool g_connection_pool;
|
ConnectionPool g_connection_pool;
|
||||||
int g_connection_pool_max_idle_time = 3600;
|
int g_connection_pool_max_idle_time = 3600;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
%define FDFSServer fastdfs-server
|
%define FDFSServer fastdfs-server
|
||||||
%define FDFSClient libfdfsclient
|
%define FDFSClient libfdfsclient
|
||||||
%define FDFSTool fastdfs-tool
|
%define FDFSTool fastdfs-tool
|
||||||
%define FDFSVersion 5.0.8
|
%define FDFSVersion 5.0.9
|
||||||
|
|
||||||
Name: %{FastDFS}
|
Name: %{FastDFS}
|
||||||
Version: %{FDFSVersion}
|
Version: %{FDFSVersion}
|
||||||
|
|
@ -16,13 +16,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.24
|
BuildRequires: libfastcommon-devel >= 1.0.30
|
||||||
|
|
||||||
%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.24
|
Requires: libfastcommon >= 1.0.30
|
||||||
Summary: fastdfs tracker & storage
|
Summary: fastdfs tracker & storage
|
||||||
|
|
||||||
%package -n %{FDFSTool}
|
%package -n %{FDFSTool}
|
||||||
|
|
|
||||||
|
|
@ -2952,6 +2952,8 @@ static int tracker_deal_server_list_all_groups(struct fast_task_info *pTask)
|
||||||
FDFSGroupInfo **ppEnd;
|
FDFSGroupInfo **ppEnd;
|
||||||
TrackerGroupStat *groupStats;
|
TrackerGroupStat *groupStats;
|
||||||
TrackerGroupStat *pDest;
|
TrackerGroupStat *pDest;
|
||||||
|
int result;
|
||||||
|
int expect_size;
|
||||||
|
|
||||||
if (pTask->length - sizeof(TrackerHeader) != 0)
|
if (pTask->length - sizeof(TrackerHeader) != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -2966,6 +2968,13 @@ static int tracker_deal_server_list_all_groups(struct fast_task_info *pTask)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expect_size = sizeof(TrackerHeader) + g_groups.count * sizeof(TrackerGroupStat);
|
||||||
|
if ((result=free_queue_set_buffer_size(pTask, expect_size)) != 0)
|
||||||
|
{
|
||||||
|
pTask->length = sizeof(TrackerHeader);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
groupStats = (TrackerGroupStat *)(pTask->data + sizeof(TrackerHeader));
|
groupStats = (TrackerGroupStat *)(pTask->data + sizeof(TrackerHeader));
|
||||||
pDest = groupStats;
|
pDest = groupStats;
|
||||||
ppEnd = g_groups.sorted_groups + g_groups.count;
|
ppEnd = g_groups.sorted_groups + g_groups.count;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue