fix previous value in trunk_save_merged_spaces
parent
2ab095bafd
commit
49d51e949b
2
HISTORY
2
HISTORY
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Version 6.05 2019-12-22
|
Version 6.05 2019-12-23
|
||||||
* fdfs_trackerd and fdfs_storaged print the server version in usage.
|
* fdfs_trackerd and fdfs_storaged print the server version in usage.
|
||||||
you can execute fdfs_trackerd or fdfs_storaged without parameters
|
you can execute fdfs_trackerd or fdfs_storaged without parameters
|
||||||
to show the server version
|
to show the server version
|
||||||
|
|
|
||||||
|
|
@ -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 = {6, 4};
|
Version g_fdfs_version = {6, 5};
|
||||||
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;
|
||||||
|
|
|
||||||
|
|
@ -591,14 +591,14 @@ static int trunk_save_merged_spaces(struct walk_callback_args *pCallbackArgs)
|
||||||
ppEnd = pCallbackArgs->trunk_array.trunks +
|
ppEnd = pCallbackArgs->trunk_array.trunks +
|
||||||
pCallbackArgs->trunk_array.count;
|
pCallbackArgs->trunk_array.count;
|
||||||
ppTrunkInfo = pCallbackArgs->trunk_array.trunks;
|
ppTrunkInfo = pCallbackArgs->trunk_array.trunks;
|
||||||
ppMergeFirst = ppTrunkInfo;
|
ppMergeFirst = previous = ppTrunkInfo;
|
||||||
while (++ppTrunkInfo < ppEnd)
|
while (++ppTrunkInfo < ppEnd)
|
||||||
{
|
{
|
||||||
previous = ppTrunkInfo - 1;
|
|
||||||
if (trunk_compare_path_and_id(*previous, *ppTrunkInfo) == 0 &&
|
if (trunk_compare_path_and_id(*previous, *ppTrunkInfo) == 0 &&
|
||||||
(*previous)->file.offset + (*previous)->file.size ==
|
(*previous)->file.offset + (*previous)->file.size ==
|
||||||
(*ppTrunkInfo)->file.offset)
|
(*ppTrunkInfo)->file.offset)
|
||||||
{
|
{
|
||||||
|
previous = ppTrunkInfo;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -611,7 +611,7 @@ static int trunk_save_merged_spaces(struct walk_callback_args *pCallbackArgs)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ppMergeFirst = ppTrunkInfo;
|
ppMergeFirst = previous = ppTrunkInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ppEnd - ppMergeFirst > 1)
|
if (ppEnd - ppMergeFirst > 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue