pull/48/head
yuqing 2014-08-09 12:21:28 +08:00
parent d263acfaa2
commit 7df4140439
9 changed files with 10 additions and 34 deletions

View File

@ -3,6 +3,7 @@ Version 5.03 2014-08-11
* network send and recv retry when error EINTR happen * network send and recv retry when error EINTR happen
* support mac OS Darwin * support mac OS Darwin
* use newest logger from libfastcommon * use newest logger from libfastcommon
* patches by liangry@ucweb.com
Version 5.02 2014-07-20 Version 5.02 2014-07-20
* corect README spell mistake * corect README spell mistake

View File

@ -447,7 +447,7 @@ bool fdfs_tracker_group_equals(TrackerServerGroup *pGroup1, \
ConnectionInfo *pServer2; ConnectionInfo *pServer2;
ConnectionInfo *pEnd1; ConnectionInfo *pEnd1;
if (pGroup1->server_count != pGroup1->server_count) if (pGroup1->server_count != pGroup2->server_count)
{ {
return false; return false;
} }

View File

@ -1,28 +0,0 @@
tmp_src_filename=_fdfs_check_bits_.c
cat <<EOF > $tmp_src_filename
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
printf("%d\n", (int)sizeof(long));
return 0;
}
EOF
gcc -D_FILE_OFFSET_BITS=64 -o a.out $tmp_src_filename
OS_BITS=`./a.out`
rm $tmp_src_filename a.out
TARGET_LIB="/usr/local/lib"
if [ "`id -u`" = "0" ]; then
ln -fs $TARGET_LIB/libfastcommon.so.1 /usr/lib/libfastcommon.so
ln -fs $TARGET_LIB/libfdfsclient.so.1 /usr/lib/libfdfsclient.so
if [ "$OS_BITS" = "8" ]; then
ln -fs $TARGET_LIB/libfastcommon.so.1 /usr/lib64/libfastcommon.so
ln -fs $TARGET_LIB/libfdfsclient.so.1 /usr/lib64/libfdfsclient.so
fi
fi

View File

@ -58,7 +58,7 @@ EOF
ENABLE_STATIC_LIB=0 ENABLE_STATIC_LIB=0
ENABLE_SHARED_LIB=1 ENABLE_SHARED_LIB=1
TARGET_PREFIX=/usr/local TARGET_PREFIX=/usr
TARGET_CONF_PATH=/etc/fdfs TARGET_CONF_PATH=/etc/fdfs
#WITH_LINUX_SERVICE=1 #WITH_LINUX_SERVICE=1

View File

@ -192,14 +192,11 @@ int storage_dio_queue_push(struct fast_task_info *pTask)
int storage_dio_get_thread_index(struct fast_task_info *pTask, \ int storage_dio_get_thread_index(struct fast_task_info *pTask, \
const int store_path_index, const char file_op) const int store_path_index, const char file_op)
{ {
StorageClientInfo *pClientInfo;
struct storage_dio_thread_data *pThreadData; struct storage_dio_thread_data *pThreadData;
struct storage_dio_context *contexts; struct storage_dio_context *contexts;
struct storage_dio_context *pContext; struct storage_dio_context *pContext;
int count; int count;
pClientInfo = (StorageClientInfo *)pTask->arg;
pThreadData = g_dio_thread_data + store_path_index; pThreadData = g_dio_thread_data + store_path_index;
if (g_disk_rw_separated) if (g_disk_rw_separated)
{ {

View File

@ -1,7 +1,7 @@
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
COMPILE = $(CC) -g -Wall -O -D_FILE_OFFSET_BITS=64 -DDEBUG COMPILE = $(CC) -g -Wall -O -D_FILE_OFFSET_BITS=64 -DDEBUG
INC_PATH = -I/usr/local/include -I/usr/local/include/fastdfs -I/usr/local/include/fastcommon INC_PATH = -I/usr/local/include -I/usr/include/fastdfs -I/usr/include/fastcommon
LIB_PATH = -L/usr/local/lib -lfdfsclient -lfastcommon LIB_PATH = -L/usr/local/lib -lfdfsclient -lfastcommon
TARGET_PATH = $(TARGET_PREFIX)/bin TARGET_PATH = $(TARGET_PREFIX)/bin

View File

@ -167,6 +167,7 @@ static int combine_stat_by(const char *file_prefix, EntryStat *stats, const int
{ {
printf("sscanf %s fail, errno: %d, error info: %s\n", printf("sscanf %s fail, errno: %d, error info: %s\n",
filename, errno, STRERROR(errno)); filename, errno, STRERROR(errno));
fclose(fp);
return errno != 0 ? errno : EINVAL; return errno != 0 ? errno : EINVAL;
} }
} }
@ -174,6 +175,7 @@ static int combine_stat_by(const char *file_prefix, EntryStat *stats, const int
{ {
printf("sscanf %s fail, errno: %d, error info: %s\n", printf("sscanf %s fail, errno: %d, error info: %s\n",
filename, errno, STRERROR(errno)); filename, errno, STRERROR(errno));
fclose(fp);
return errno != 0 ? errno : EINVAL; return errno != 0 ? errno : EINVAL;
} }
} }
@ -192,6 +194,7 @@ static int combine_stat_by(const char *file_prefix, EntryStat *stats, const int
if (*entry_count >= max_entries) if (*entry_count >= max_entries)
{ {
printf("entry count: %d >= max entries: %d\n", *entry_count, max_entries); printf("entry count: %d >= max entries: %d\n", *entry_count, max_entries);
fclose(fp);
return ENOSPC; return ENOSPC;
} }

View File

@ -55,6 +55,7 @@ int main()
{ {
printf("write file %s fail, errno: %d, error info: %s\n", printf("write file %s fail, errno: %d, error info: %s\n",
files[i].filename, errno, STRERROR(errno)); files[i].filename, errno, STRERROR(errno));
fclose(fp);
return 1; return 1;
} }
} }
@ -64,6 +65,7 @@ int main()
{ {
printf("write file %s fail, errno: %d, error info: %s\n", printf("write file %s fail, errno: %d, error info: %s\n",
files[i].filename, errno, STRERROR(errno)); files[i].filename, errno, STRERROR(errno));
fclose(fp);
return 1; return 1;
} }

View File

@ -2940,6 +2940,7 @@ static int tracker_mem_realloc_store_servers(FDFSGroupInfo *pGroup, \
{ {
free(new_servers); free(new_servers);
free(new_sorted_servers); free(new_sorted_servers);
free(new_active_servers);
return result; return result;
} }