adapt to the newest libfastcommon and libserverframe
parent
bfb3e9f887
commit
7cae2bfb2b
|
|
@ -241,7 +241,7 @@ static int fdfs_get_params_from_tracker(bool *use_storage_id)
|
||||||
|
|
||||||
continue_flag = false;
|
continue_flag = false;
|
||||||
if ((result=fdfs_get_ini_context_from_tracker(&g_tracker_group,
|
if ((result=fdfs_get_ini_context_from_tracker(&g_tracker_group,
|
||||||
&iniContext, &continue_flag, false, NULL)) != 0)
|
&iniContext, &continue_flag)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,14 @@ client_bind = true
|
||||||
# the storage server port
|
# the storage server port
|
||||||
port = 23000
|
port = 23000
|
||||||
|
|
||||||
|
# the address family of service, value list:
|
||||||
|
## IPv4: IPv4 stack
|
||||||
|
## IPv6: IPv6 stack
|
||||||
|
## auto: auto detect, IPv4 first, then IPv6
|
||||||
|
## both: IPv4 and IPv6 dual stacks
|
||||||
|
# default value is auto
|
||||||
|
address_family = auto
|
||||||
|
|
||||||
# connect timeout in seconds
|
# connect timeout in seconds
|
||||||
# default value is 30
|
# default value is 30
|
||||||
# Note: in the intranet network (LAN), 2 seconds is enough.
|
# Note: in the intranet network (LAN), 2 seconds is enough.
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,14 @@ bind_addr =
|
||||||
# the tracker server port
|
# the tracker server port
|
||||||
port = 22122
|
port = 22122
|
||||||
|
|
||||||
|
# the address family of service, value list:
|
||||||
|
## IPv4: IPv4 stack
|
||||||
|
## IPv6: IPv6 stack
|
||||||
|
## auto: auto detect, IPv4 first, then IPv6
|
||||||
|
## both: IPv4 and IPv6 dual stacks
|
||||||
|
# default value is auto
|
||||||
|
address_family = auto
|
||||||
|
|
||||||
# connect timeout in seconds
|
# connect timeout in seconds
|
||||||
# default value is 30
|
# default value is 30
|
||||||
# Note: in the intranet network (LAN), 2 seconds is enough.
|
# Note: in the intranet network (LAN), 2 seconds is enough.
|
||||||
|
|
|
||||||
|
|
@ -351,14 +351,30 @@ static void sigAlarmHandler(int sig)
|
||||||
logDebug("file: "__FILE__", line: %d, " \
|
logDebug("file: "__FILE__", line: %d, " \
|
||||||
"signal server to quit...", __LINE__);
|
"signal server to quit...", __LINE__);
|
||||||
|
|
||||||
if (*SF_G_INNER_BIND_ADDR != '\0')
|
if (SF_G_IPV4_ENABLED)
|
||||||
{
|
{
|
||||||
strcpy(server.ip_addr, SF_G_INNER_BIND_ADDR);
|
server.af = AF_INET;
|
||||||
}
|
if (*SF_G_INNER_BIND_ADDR4 != '\0')
|
||||||
else
|
{
|
||||||
{
|
strcpy(server.ip_addr, SF_G_INNER_BIND_ADDR4);
|
||||||
strcpy(server.ip_addr, "127.0.0.1");
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, LOCAL_LOOPBACK_IPv4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
server.af = AF_INET6;
|
||||||
|
if (*SF_G_INNER_BIND_ADDR6 != '\0')
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, SF_G_INNER_BIND_ADDR6);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, LOCAL_LOOPBACK_IPv6);
|
||||||
|
}
|
||||||
|
}
|
||||||
server.port = SF_G_INNER_PORT;
|
server.port = SF_G_INNER_PORT;
|
||||||
server.sock = -1;
|
server.sock = -1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,8 @@ static int fdfs_dump_global_vars(char *buff, const int buffSize)
|
||||||
"g_check_file_duplicate=%d\n"
|
"g_check_file_duplicate=%d\n"
|
||||||
"g_key_namespace=%s\n"
|
"g_key_namespace=%s\n"
|
||||||
"g_namespace_len=%d\n"
|
"g_namespace_len=%d\n"
|
||||||
"SF_G_INNER_BIND_ADDR=%s\n"
|
"bind_addr_ipv4=%s\n"
|
||||||
|
"bind_addr_ipv6=%s\n"
|
||||||
"g_client_bind_addr=%d\n"
|
"g_client_bind_addr=%d\n"
|
||||||
"g_storage_ip_changed_auto_adjust=%d\n"
|
"g_storage_ip_changed_auto_adjust=%d\n"
|
||||||
"g_thread_kill_done=%d\n"
|
"g_thread_kill_done=%d\n"
|
||||||
|
|
@ -188,7 +189,8 @@ static int fdfs_dump_global_vars(char *buff, const int buffSize)
|
||||||
, g_check_file_duplicate
|
, g_check_file_duplicate
|
||||||
, g_key_namespace
|
, g_key_namespace
|
||||||
, g_namespace_len
|
, g_namespace_len
|
||||||
, SF_G_INNER_BIND_ADDR
|
, SF_G_INNER_BIND_ADDR4
|
||||||
|
, SF_G_INNER_BIND_ADDR6
|
||||||
, g_client_bind_addr
|
, g_client_bind_addr
|
||||||
, g_storage_ip_changed_auto_adjust
|
, g_storage_ip_changed_auto_adjust
|
||||||
, g_thread_kill_done
|
, g_thread_kill_done
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,8 @@ int storage_get_my_tracker_client_ip()
|
||||||
for (i=0; i < 3; i++)
|
for (i=0; i < 3; i++)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
&result, false);
|
&result, false);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -234,7 +235,8 @@ static int storage_report_storage_ip_addr()
|
||||||
for (i=0; i < 3; i++)
|
for (i=0; i < 3; i++)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
&result, false);
|
&result, false);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -304,7 +306,8 @@ int storage_changelog_req()
|
||||||
for (i=0; i < 3; i++)
|
for (i=0; i < 3; i++)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
&result, false);
|
&result, false);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,10 @@ int storage_get_params_from_tracker()
|
||||||
char reserved_space_str[32];
|
char reserved_space_str[32];
|
||||||
char *pIdType;
|
char *pIdType;
|
||||||
|
|
||||||
if ((result=fdfs_get_ini_context_from_tracker(&g_tracker_group,
|
if ((result=fdfs_get_ini_context_from_tracker_ex(&g_tracker_group,
|
||||||
&iniContext, (bool * volatile)&SF_G_CONTINUE_FLAG,
|
&iniContext, (bool * volatile)&SF_G_CONTINUE_FLAG,
|
||||||
g_client_bind_addr, SF_G_INNER_BIND_ADDR)) != 0)
|
g_client_bind_addr, SF_G_INNER_BIND_ADDR4,
|
||||||
|
SF_G_INNER_BIND_ADDR6)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2050,7 +2050,9 @@ int storage_report_storage_status(const char *storage_id, \
|
||||||
for (i=0; i < 3; i++)
|
for (i=0; i < 3; i++)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL, &result, false);
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
|
&result, false);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
@ -2146,7 +2148,9 @@ static int storage_reader_sync_init_req(StorageBinLogReader *pReader)
|
||||||
while (SF_G_CONTINUE_FLAG)
|
while (SF_G_CONTINUE_FLAG)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL, &result, true);
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
|
&result, true);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ void storage_sync_connect_storage_server_ex(const FDFSStorageBrief *pStorage,
|
||||||
int i;
|
int i;
|
||||||
FDFSMultiIP ip_addrs;
|
FDFSMultiIP ip_addrs;
|
||||||
FDFSMultiIP *multi_ip;
|
FDFSMultiIP *multi_ip;
|
||||||
|
const char *bind_addr;
|
||||||
|
|
||||||
multi_ip = NULL;
|
multi_ip = NULL;
|
||||||
if (g_use_storage_id)
|
if (g_use_storage_id)
|
||||||
|
|
@ -83,9 +84,17 @@ void storage_sync_connect_storage_server_ex(const FDFSStorageBrief *pStorage,
|
||||||
for (i=0; i<ip_addrs.count; i++)
|
for (i=0; i<ip_addrs.count; i++)
|
||||||
{
|
{
|
||||||
strcpy(conn->ip_addr, ip_addrs.ips[i].address);
|
strcpy(conn->ip_addr, ip_addrs.ips[i].address);
|
||||||
|
if (g_client_bind_addr)
|
||||||
|
{
|
||||||
|
bind_addr = is_ipv6_addr(conn->ip_addr) ?
|
||||||
|
SF_G_INNER_BIND_ADDR6 : SF_G_INNER_BIND_ADDR4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bind_addr = NULL;
|
||||||
|
}
|
||||||
conn->sock = socketCreateExAuto(conn->ip_addr,
|
conn->sock = socketCreateExAuto(conn->ip_addr,
|
||||||
O_NONBLOCK, g_client_bind_addr ?
|
O_NONBLOCK, bind_addr, &result);
|
||||||
SF_G_INNER_BIND_ADDR : NULL, &result);
|
|
||||||
if (conn->sock < 0)
|
if (conn->sock < 0)
|
||||||
{
|
{
|
||||||
logCrit("file: "__FILE__", line: %d, "
|
logCrit("file: "__FILE__", line: %d, "
|
||||||
|
|
|
||||||
|
|
@ -257,9 +257,10 @@ static void *tracker_report_thread_entrance(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
conn = tracker_connect_server_no_pool_ex(pTrackerServer,
|
conn = tracker_connect_server_no_pool_ex(pTrackerServer,
|
||||||
g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR4 : NULL),
|
||||||
|
(g_client_bind_addr ? SF_G_INNER_BIND_ADDR6 : NULL),
|
||||||
&result, false);
|
&result, false);
|
||||||
if (conn == NULL)
|
if (conn == NULL)
|
||||||
{
|
{
|
||||||
if (previousCode != result)
|
if (previousCode != result)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
#define FILENAME_FILE_ID "file_id"
|
#define FILENAME_FILE_ID "file_id"
|
||||||
#define FILENAME_FAIL "fail"
|
#define FILENAME_FAIL "fail"
|
||||||
|
|
||||||
#define IP_ADDRESS_SIZE 16
|
|
||||||
#define SRAND_SEED 1225420780
|
#define SRAND_SEED 1225420780
|
||||||
|
|
||||||
#define TIME_SUB_MS(tv1, tv2) ((tv1.tv_sec - tv2.tv_sec) * 1000 + (tv1.tv_usec - tv2.tv_usec) / 1000)
|
#define TIME_SUB_MS(tv1, tv2) ((tv1.tv_sec - tv2.tv_sec) * 1000 + (tv1.tv_usec - tv2.tv_usec) / 1000)
|
||||||
|
|
|
||||||
|
|
@ -423,14 +423,30 @@ static void sigAlarmHandler(int sig)
|
||||||
logDebug("file: "__FILE__", line: %d, " \
|
logDebug("file: "__FILE__", line: %d, " \
|
||||||
"signal server to quit...", __LINE__);
|
"signal server to quit...", __LINE__);
|
||||||
|
|
||||||
if (*g_sf_context.inner_bind_addr != '\0')
|
if (SF_G_IPV4_ENABLED)
|
||||||
{
|
{
|
||||||
strcpy(server.ip_addr, g_sf_context.inner_bind_addr);
|
server.af = AF_INET;
|
||||||
}
|
if (*SF_G_INNER_BIND_ADDR4 != '\0')
|
||||||
else
|
{
|
||||||
{
|
strcpy(server.ip_addr, SF_G_INNER_BIND_ADDR4);
|
||||||
strcpy(server.ip_addr, "127.0.0.1");
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, LOCAL_LOOPBACK_IPv4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
server.af = AF_INET6;
|
||||||
|
if (*SF_G_INNER_BIND_ADDR6 != '\0')
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, SF_G_INNER_BIND_ADDR6);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strcpy(server.ip_addr, LOCAL_LOOPBACK_IPv6);
|
||||||
|
}
|
||||||
|
}
|
||||||
server.port = SF_G_INNER_PORT;
|
server.port = SF_G_INNER_PORT;
|
||||||
server.sock = -1;
|
server.sock = -1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -488,7 +488,8 @@ ConnectionInfo *tracker_connect_server_ex(TrackerServerInfo *pServerInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo,
|
ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo,
|
||||||
const char *bind_addr, int *err_no, const bool log_connect_error)
|
const char *bind_addr4, const char *bind_addr6, int *err_no,
|
||||||
|
const bool log_connect_error)
|
||||||
{
|
{
|
||||||
ConnectionInfo *conn;
|
ConnectionInfo *conn;
|
||||||
ConnectionInfo *end;
|
ConnectionInfo *end;
|
||||||
|
|
@ -500,12 +501,12 @@ ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo
|
||||||
return pServerInfo->connections + pServerInfo->index;
|
return pServerInfo->connections + pServerInfo->index;
|
||||||
}
|
}
|
||||||
|
|
||||||
*err_no = conn_pool_connect_server_ex(pServerInfo->connections
|
conn = pServerInfo->connections + pServerInfo->index;
|
||||||
+ pServerInfo->index, SF_G_CONNECT_TIMEOUT * 1000,
|
*err_no = conn_pool_connect_server_ex(conn, SF_G_CONNECT_TIMEOUT * 1000,
|
||||||
bind_addr, log_connect_error);
|
conn->af == AF_INET ? bind_addr4 : bind_addr6, log_connect_error);
|
||||||
if (*err_no == 0)
|
if (*err_no == 0)
|
||||||
{
|
{
|
||||||
return pServerInfo->connections + pServerInfo->index;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pServerInfo->count == 1)
|
if (pServerInfo->count == 1)
|
||||||
|
|
@ -520,11 +521,12 @@ ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo
|
||||||
if (current_index != pServerInfo->index)
|
if (current_index != pServerInfo->index)
|
||||||
{
|
{
|
||||||
if ((*err_no=conn_pool_connect_server_ex(conn,
|
if ((*err_no=conn_pool_connect_server_ex(conn,
|
||||||
SF_G_CONNECT_TIMEOUT * 1000, bind_addr,
|
SF_G_CONNECT_TIMEOUT * 1000,
|
||||||
log_connect_error)) == 0)
|
conn->af == AF_INET ? bind_addr4 :
|
||||||
|
bind_addr6, log_connect_error)) == 0)
|
||||||
{
|
{
|
||||||
pServerInfo->index = current_index;
|
pServerInfo->index = current_index;
|
||||||
return pServerInfo->connections + pServerInfo->index;
|
return conn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -633,9 +635,10 @@ static int fdfs_do_parameter_req(ConnectionInfo *pTrackerServer, \
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fdfs_get_ini_context_from_tracker(TrackerServerGroup *pTrackerGroup, \
|
int fdfs_get_ini_context_from_tracker_ex(TrackerServerGroup *pTrackerGroup,
|
||||||
IniContext *iniContext, bool * volatile continue_flag, \
|
IniContext *iniContext, bool * volatile continue_flag,
|
||||||
const bool client_bind_addr, const char *bind_addr)
|
const bool client_bind_addr, const char *bind_addr4,
|
||||||
|
const char *bind_addr6)
|
||||||
{
|
{
|
||||||
ConnectionInfo *conn;
|
ConnectionInfo *conn;
|
||||||
TrackerServerInfo *pGlobalServer;
|
TrackerServerInfo *pGlobalServer;
|
||||||
|
|
@ -664,7 +667,14 @@ int fdfs_get_ini_context_from_tracker(TrackerServerGroup *pTrackerGroup, \
|
||||||
|
|
||||||
if (!client_bind_addr)
|
if (!client_bind_addr)
|
||||||
{
|
{
|
||||||
bind_addr = NULL;
|
if (bind_addr4 != NULL)
|
||||||
|
{
|
||||||
|
bind_addr4 = NULL;
|
||||||
|
}
|
||||||
|
if (bind_addr6 != NULL)
|
||||||
|
{
|
||||||
|
bind_addr6 = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|
@ -678,7 +688,7 @@ int fdfs_get_ini_context_from_tracker(TrackerServerGroup *pTrackerGroup, \
|
||||||
for (i=0; i < 3; i++)
|
for (i=0; i < 3; i++)
|
||||||
{
|
{
|
||||||
conn = tracker_connect_server_no_pool_ex(pTServer,
|
conn = tracker_connect_server_no_pool_ex(pTServer,
|
||||||
bind_addr, &result, false);
|
bind_addr4, bind_addr6, &result, false);
|
||||||
if (conn != NULL)
|
if (conn != NULL)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -240,13 +240,15 @@ ConnectionInfo *tracker_connect_server_ex(TrackerServerInfo *pServerInfo,
|
||||||
* connect to the tracker server directly without connection pool
|
* connect to the tracker server directly without connection pool
|
||||||
* params:
|
* params:
|
||||||
* pTrackerServer: tracker server
|
* pTrackerServer: tracker server
|
||||||
* bind_ipaddr: the ip address to bind, NULL or empty for any
|
* bind_addr4: the ipv4 address to bind, NULL or empty for any
|
||||||
|
* bind_addr6: the ipv6 address to bind, NULL or empty for any
|
||||||
* err_no: return the error no
|
* err_no: return the error no
|
||||||
* log_connect_error: if log error info when connect fail
|
* log_connect_error: if log error info when connect fail
|
||||||
* return: ConnectionInfo pointer for success, NULL for fail
|
* return: ConnectionInfo pointer for success, NULL for fail
|
||||||
**/
|
**/
|
||||||
ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo,
|
ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo,
|
||||||
const char *bind_addr, int *err_no, const bool log_connect_error);
|
const char *bind_addr4, const char *bind_addr6, int *err_no,
|
||||||
|
const bool log_connect_error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* connect to the tracker server directly without connection pool
|
* connect to the tracker server directly without connection pool
|
||||||
|
|
@ -258,9 +260,10 @@ ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo
|
||||||
static inline ConnectionInfo *tracker_connect_server_no_pool(
|
static inline ConnectionInfo *tracker_connect_server_no_pool(
|
||||||
TrackerServerInfo *pServerInfo, int *err_no)
|
TrackerServerInfo *pServerInfo, int *err_no)
|
||||||
{
|
{
|
||||||
const char *bind_addr = NULL;
|
const char *bind_addr4 = NULL;
|
||||||
|
const char *bind_addr6 = NULL;
|
||||||
return tracker_connect_server_no_pool_ex(pServerInfo,
|
return tracker_connect_server_no_pool_ex(pServerInfo,
|
||||||
bind_addr, err_no, true);
|
bind_addr4, bind_addr6, err_no, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define tracker_close_connection(pTrackerServer) \
|
#define tracker_close_connection(pTrackerServer) \
|
||||||
|
|
@ -316,15 +319,21 @@ int fdfs_deal_no_body_cmd_ex(const char *ip_addr, const int port, const int cmd)
|
||||||
fdfs_split_metadata_ex(meta_buff, FDFS_RECORD_SEPERATOR, \
|
fdfs_split_metadata_ex(meta_buff, FDFS_RECORD_SEPERATOR, \
|
||||||
FDFS_FIELD_SEPERATOR, meta_count, err_no)
|
FDFS_FIELD_SEPERATOR, meta_count, err_no)
|
||||||
|
|
||||||
char *fdfs_pack_metadata(const FDFSMetaData *meta_list, const int meta_count, \
|
char *fdfs_pack_metadata(const FDFSMetaData *meta_list, const int meta_count,
|
||||||
char *meta_buff, int *buff_bytes);
|
char *meta_buff, int *buff_bytes);
|
||||||
FDFSMetaData *fdfs_split_metadata_ex(char *meta_buff, \
|
FDFSMetaData *fdfs_split_metadata_ex(char *meta_buff,
|
||||||
const char recordSeperator, const char filedSeperator, \
|
const char recordSeperator, const char filedSeperator,
|
||||||
int *meta_count, int *err_no);
|
int *meta_count, int *err_no);
|
||||||
|
|
||||||
int fdfs_get_ini_context_from_tracker(TrackerServerGroup *pTrackerGroup, \
|
int fdfs_get_ini_context_from_tracker_ex(TrackerServerGroup *pTrackerGroup,
|
||||||
IniContext *iniContext, bool * volatile continue_flag, \
|
IniContext *iniContext, bool * volatile continue_flag,
|
||||||
const bool client_bind_addr, const char *bind_addr);
|
const bool client_bind_addr, const char *bind_addr4,
|
||||||
|
const char *bind_addr6);
|
||||||
|
|
||||||
|
#define fdfs_get_ini_context_from_tracker(pTrackerGroup, \
|
||||||
|
iniContext, continue_flag) \
|
||||||
|
fdfs_get_ini_context_from_tracker_ex(pTrackerGroup, \
|
||||||
|
iniContext, continue_flag, false, NULL, NULL)
|
||||||
|
|
||||||
int fdfs_get_tracker_status(TrackerServerInfo *pTrackerServer,
|
int fdfs_get_tracker_status(TrackerServerInfo *pTrackerServer,
|
||||||
TrackerRunningStatus *pStatus);
|
TrackerRunningStatus *pStatus);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue