output port with format %u instead %d

pull/616/head
YuQing 2022-12-16 16:11:41 +08:00
parent ab1c27c197
commit bc52a5d6e1
25 changed files with 284 additions and 281 deletions

View File

@ -140,7 +140,7 @@ static int copy_tracker_servers(TrackerServerGroup *pTrackerGroup,
for (pServer=pTrackerGroup->servers; pServer<pTrackerGroup->servers+ \ for (pServer=pTrackerGroup->servers; pServer<pTrackerGroup->servers+ \
pTrackerGroup->server_count; pServer++) pTrackerGroup->server_count; pServer++)
{ {
//printf("server=%s:%d\n", \ //printf("server=%s:%u\n", \
pServer->ip_addr, pServer->port); pServer->ip_addr, pServer->port);
} }
} }

View File

@ -155,7 +155,7 @@ int main(int argc, char *argv[])
fdfs_client_destroy(); fdfs_client_destroy();
return errno != 0 ? errno : ECONNREFUSED; return errno != 0 ? errno : ECONNREFUSED;
} }
printf("\ntracker server is %s:%d\n\n", pTrackerServer->ip_addr, pTrackerServer->port); printf("\ntracker server is %s:%u\n\n", pTrackerServer->ip_addr, pTrackerServer->port);
if (arg_index < argc) if (arg_index < argc)
{ {

View File

@ -460,7 +460,7 @@ g_fdfs_version.patch);
printf("server list (%d):\n", server_count); printf("server list (%d):\n", server_count);
for (i=0; i<server_count; i++) for (i=0; i<server_count; i++)
{ {
printf("\t%s:%d\n", \ printf("\t%s:%u\n", \
storageServers[i].ip_addr, \ storageServers[i].ip_addr, \
storageServers[i].port); storageServers[i].port);
} }
@ -488,7 +488,7 @@ g_fdfs_version.patch);
return result; return result;
} }
printf("storage=%s:%d\n", storageServer.ip_addr, \ printf("storage=%s:%u\n", storageServer.ip_addr, \
storageServer.port); storageServer.port);
if ((pStorageServer=tracker_make_connection(&storageServer, \ if ((pStorageServer=tracker_make_connection(&storageServer, \
@ -670,14 +670,14 @@ g_fdfs_version.patch);
/* for test only */ /* for test only */
if ((result=fdfs_active_test(pTrackerServer)) != 0) if ((result=fdfs_active_test(pTrackerServer)) != 0)
{ {
printf("active_test to tracker server %s:%d fail, errno: %d\n", \ printf("active_test to tracker server %s:%u fail, errno: %d\n", \
pTrackerServer->ip_addr, pTrackerServer->port, result); pTrackerServer->ip_addr, pTrackerServer->port, result);
} }
/* for test only */ /* for test only */
if ((result=fdfs_active_test(pStorageServer)) != 0) if ((result=fdfs_active_test(pStorageServer)) != 0)
{ {
printf("active_test to storage server %s:%d fail, errno: %d\n", \ printf("active_test to storage server %s:%u fail, errno: %d\n", \
pStorageServer->ip_addr, pStorageServer->port, result); pStorageServer->ip_addr, pStorageServer->port, result);
} }

View File

@ -432,7 +432,7 @@ g_fdfs_version.patch);
printf("server list (%d):\n", server_count); printf("server list (%d):\n", server_count);
for (i=0; i<server_count; i++) for (i=0; i<server_count; i++)
{ {
printf("\t%s:%d\n", \ printf("\t%s:%u\n", \
storageServers[i].ip_addr, \ storageServers[i].ip_addr, \
storageServers[i].port); storageServers[i].port);
} }
@ -455,7 +455,7 @@ g_fdfs_version.patch);
return result; return result;
} }
printf("storage=%s:%d\n", storageServer.ip_addr, \ printf("storage=%s:%u\n", storageServer.ip_addr, \
storageServer.port); storageServer.port);
if ((pStorageServer=tracker_make_connection(&storageServer, \ if ((pStorageServer=tracker_make_connection(&storageServer, \
@ -637,14 +637,14 @@ g_fdfs_version.patch);
/* for test only */ /* for test only */
if ((result=fdfs_active_test(pTrackerServer)) != 0) if ((result=fdfs_active_test(pTrackerServer)) != 0)
{ {
printf("active_test to tracker server %s:%d fail, errno: %d\n", \ printf("active_test to tracker server %s:%u fail, errno: %d\n", \
pTrackerServer->ip_addr, pTrackerServer->port, result); pTrackerServer->ip_addr, pTrackerServer->port, result);
} }
/* for test only */ /* for test only */
if ((result=fdfs_active_test(pStorageServer)) != 0) if ((result=fdfs_active_test(pStorageServer)) != 0)
{ {
printf("active_test to storage server %s:%d fail, errno: %d\n", \ printf("active_test to storage server %s:%u fail, errno: %d\n", \
pStorageServer->ip_addr, pStorageServer->port, result); pStorageServer->ip_addr, pStorageServer->port, result);
} }

View File

@ -255,7 +255,7 @@ int storage_get_metadata(ConnectionInfo *pTrackerServer, \
filename_len, SF_G_NETWORK_TIMEOUT)) != 0) filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -355,7 +355,7 @@ int storage_query_file_info_ex(ConnectionInfo *pTrackerServer, \
filename_len, SF_G_NETWORK_TIMEOUT)) != 0) filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -376,7 +376,7 @@ int storage_query_file_info_ex(ConnectionInfo *pTrackerServer, \
if (in_bytes != sizeof(in_buff)) if (in_bytes != sizeof(in_buff))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"recv data from storage server %s:%d fail, " \ "recv data from storage server %s:%u fail, " \
"recv bytes: %"PRId64" != %d", __LINE__, \ "recv bytes: %"PRId64" != %d", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
in_bytes, (int)sizeof(in_buff)); in_bytes, (int)sizeof(in_buff));
@ -485,7 +485,7 @@ int storage_delete_file(ConnectionInfo *pTrackerServer, \
filename_len, SF_G_NETWORK_TIMEOUT)) != 0) filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -581,7 +581,7 @@ int storage_do_download_file_ex(ConnectionInfo *pTrackerServer, \
out_bytes, SF_G_NETWORK_TIMEOUT)) != 0) out_bytes, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -653,7 +653,7 @@ int storage_do_download_file_ex(ConnectionInfo *pTrackerServer, \
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"recv data from storage server " \ "recv data from storage server " \
"%s:%d fail, " \ "%s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, \ pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -870,7 +870,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
*group_name = '\0'; *group_name = '\0';
/* /*
//logInfo("upload to storage %s:%d\n", \ //logInfo("upload to storage %s:%u\n", \
pStorageServer->ip_addr, pStorageServer->port); pStorageServer->ip_addr, pStorageServer->port);
*/ */
@ -941,7 +941,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -964,7 +964,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -994,7 +994,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN) if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should > %d", __LINE__, \ "should > %d", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
@ -1222,7 +1222,7 @@ int storage_set_metadata(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1234,7 +1234,7 @@ int storage_set_metadata(ConnectionInfo *pTrackerServer, \
meta_buff, meta_bytes, SF_G_NETWORK_TIMEOUT)) != 0) meta_buff, meta_bytes, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1436,7 +1436,7 @@ int storage_client_create_link(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1456,7 +1456,7 @@ int storage_client_create_link(ConnectionInfo *pTrackerServer, \
if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN) if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should > %d", __LINE__, \ "should > %d", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
@ -1706,7 +1706,7 @@ int storage_do_append_file(ConnectionInfo *pTrackerServer, \
} }
/* /*
//printf("upload to storage %s:%d\n", \ //printf("upload to storage %s:%u\n", \
pStorageServer->ip_addr, pStorageServer->port); pStorageServer->ip_addr, pStorageServer->port);
*/ */
@ -1732,7 +1732,7 @@ int storage_do_append_file(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1755,7 +1755,7 @@ int storage_do_append_file(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1783,7 +1783,7 @@ int storage_do_append_file(ConnectionInfo *pTrackerServer, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should == 0", __LINE__, pStorageServer->ip_addr, \ "should == 0", __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, in_bytes); pStorageServer->port, in_bytes);
@ -1834,7 +1834,7 @@ int storage_do_modify_file(ConnectionInfo *pTrackerServer, \
} }
/* /*
//printf("upload to storage %s:%d\n", \ //printf("upload to storage %s:%u\n", \
pStorageServer->ip_addr, pStorageServer->port); pStorageServer->ip_addr, pStorageServer->port);
*/ */
@ -1863,7 +1863,7 @@ int storage_do_modify_file(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1886,7 +1886,7 @@ int storage_do_modify_file(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1914,7 +1914,7 @@ int storage_do_modify_file(ConnectionInfo *pTrackerServer, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should == 0", __LINE__, pStorageServer->ip_addr, \ "should == 0", __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, in_bytes); pStorageServer->port, in_bytes);
@ -2301,7 +2301,7 @@ int storage_truncate_file(ConnectionInfo *pTrackerServer, \
} }
/* /*
//printf("upload to storage %s:%d\n", \ //printf("upload to storage %s:%u\n", \
pStorageServer->ip_addr, pStorageServer->port); pStorageServer->ip_addr, pStorageServer->port);
*/ */
@ -2327,7 +2327,7 @@ int storage_truncate_file(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pStorageServer->ip_addr, pStorageServer->port, \ pStorageServer->ip_addr, pStorageServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -2345,7 +2345,7 @@ int storage_truncate_file(ConnectionInfo *pTrackerServer, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should == 0", __LINE__, pStorageServer->ip_addr, \ "should == 0", __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, in_bytes); pStorageServer->port, in_bytes);
@ -2403,7 +2403,7 @@ int storage_regenerate_appender_filename(ConnectionInfo *pTrackerServer,
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to storage server %s:%d fail, " "send data to storage server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
pStorageServer->ip_addr, pStorageServer->port, pStorageServer->ip_addr, pStorageServer->port,
result, STRERROR(result)); result, STRERROR(result));
@ -2423,7 +2423,7 @@ int storage_regenerate_appender_filename(ConnectionInfo *pTrackerServer,
if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN) if (in_bytes <= FDFS_GROUP_NAME_MAX_LEN)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"storage server %s:%d response data " "storage server %s:%u response data "
"length: %"PRId64" is invalid, " "length: %"PRId64" is invalid, "
"should > %d", __LINE__, "should > %d", __LINE__,
pStorageServer->ip_addr, pStorageServer->port, pStorageServer->ip_addr, pStorageServer->port,

View File

@ -298,7 +298,7 @@ int tracker_list_servers(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -331,7 +331,7 @@ int tracker_list_servers(ConnectionInfo *pTrackerServer, \
if (in_bytes % sizeof(TrackerStorageStat) != 0) if (in_bytes % sizeof(TrackerStorageStat) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -343,7 +343,7 @@ int tracker_list_servers(ConnectionInfo *pTrackerServer, \
if (*storage_count > max_storages) if (*storage_count > max_storages)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d insufficent space, " \ "tracker server %s:%u insufficent space, " \
"max storage count: %d, expect count: %d", \ "max storage count: %d, expect count: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, max_storages, *storage_count); pTrackerServer->port, max_storages, *storage_count);
@ -501,7 +501,7 @@ int tracker_list_one_group(ConnectionInfo *pTrackerServer, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -533,7 +533,7 @@ int tracker_list_one_group(ConnectionInfo *pTrackerServer, \
if (in_bytes != sizeof(TrackerGroupStat)) if (in_bytes != sizeof(TrackerGroupStat))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -581,7 +581,7 @@ int tracker_list_groups(ConnectionInfo *pTrackerServer, \
sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -614,7 +614,7 @@ int tracker_list_groups(ConnectionInfo *pTrackerServer, \
if (in_bytes % sizeof(TrackerGroupStat) != 0) if (in_bytes % sizeof(TrackerGroupStat) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -626,7 +626,7 @@ int tracker_list_groups(ConnectionInfo *pTrackerServer, \
if (*group_count > max_groups) if (*group_count > max_groups)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d insufficent space, " \ "tracker server %s:%u insufficent space, " \
"max group count: %d, expect count: %d", \ "max group count: %d, expect count: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, max_groups, *group_count); pTrackerServer->port, max_groups, *group_count);
@ -698,7 +698,7 @@ int tracker_do_query_storage(ConnectionInfo *pTrackerServer, \
filename_len, SF_G_NETWORK_TIMEOUT)) != 0) filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -730,7 +730,7 @@ int tracker_do_query_storage(ConnectionInfo *pTrackerServer, \
if (in_bytes != TRACKER_QUERY_STORAGE_FETCH_BODY_LEN) if (in_bytes != TRACKER_QUERY_STORAGE_FETCH_BODY_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"expect length: %d", __LINE__, \ "expect length: %d", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
@ -782,7 +782,7 @@ int tracker_query_storage_list(ConnectionInfo *pTrackerServer, \
filename_len, SF_G_NETWORK_TIMEOUT)) != 0) filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -815,7 +815,7 @@ int tracker_query_storage_list(ConnectionInfo *pTrackerServer, \
(IP_ADDRESS_SIZE - 1) != 0) (IP_ADDRESS_SIZE - 1) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -827,7 +827,7 @@ int tracker_query_storage_list(ConnectionInfo *pTrackerServer, \
if (nMaxServerCount < *server_count) if (nMaxServerCount < *server_count)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response storage server " \ "tracker server %s:%u response storage server " \
"count: %d, exceeds max server count: %d!", __LINE__, \ "count: %d, exceeds max server count: %d!", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
*server_count, nMaxServerCount); *server_count, nMaxServerCount);
@ -881,7 +881,7 @@ int tracker_query_storage_store_without_group(ConnectionInfo *pTrackerServer,
sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -913,7 +913,7 @@ int tracker_query_storage_store_without_group(ConnectionInfo *pTrackerServer,
if (in_bytes != TRACKER_QUERY_STORAGE_STORE_BODY_LEN) if (in_bytes != TRACKER_QUERY_STORAGE_STORE_BODY_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"expect length: %d", __LINE__, \ "expect length: %d", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
@ -964,7 +964,7 @@ int tracker_query_storage_store_with_group(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -996,7 +996,7 @@ int tracker_query_storage_store_with_group(ConnectionInfo *pTrackerServer, \
if (in_bytes != TRACKER_QUERY_STORAGE_STORE_BODY_LEN) if (in_bytes != TRACKER_QUERY_STORAGE_STORE_BODY_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"expect length: %d", __LINE__, \ "expect length: %d", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
@ -1059,7 +1059,7 @@ int tracker_query_storage_store_list_with_group( \
sizeof(TrackerHeader) + out_len, SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader) + out_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1091,7 +1091,7 @@ int tracker_query_storage_store_list_with_group( \
if (in_bytes < TRACKER_QUERY_STORAGE_STORE_BODY_LEN) if (in_bytes < TRACKER_QUERY_STORAGE_STORE_BODY_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"expect length >= %d", __LINE__, \ "expect length >= %d", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
@ -1105,7 +1105,7 @@ int tracker_query_storage_store_list_with_group( \
if (ipPortsLen % RECORD_LENGTH != 0) if (ipPortsLen % RECORD_LENGTH != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -1116,7 +1116,7 @@ int tracker_query_storage_store_list_with_group( \
if (nMaxServerCount < *storage_count) if (nMaxServerCount < *storage_count)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response storage server " \ "tracker server %s:%u response storage server " \
"count: %d, exceeds max server count: %d!", \ "count: %d, exceeds max server count: %d!", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, *storage_count, nMaxServerCount); pTrackerServer->port, *storage_count, nMaxServerCount);
@ -1229,7 +1229,7 @@ int tracker_delete_storage(TrackerServerGroup *pTrackerGroup, \
storage_id_len, SF_G_NETWORK_TIMEOUT)) != 0) storage_id_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to tracker server %s:%d fail, " "send data to tracker server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -1309,7 +1309,7 @@ int tracker_delete_group(TrackerServerGroup *pTrackerGroup, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to tracker server %s:%d fail, " "send data to tracker server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -1385,7 +1385,7 @@ int tracker_set_trunk_server(TrackerServerGroup *pTrackerGroup, \
storage_id_len, SF_G_NETWORK_TIMEOUT)) != 0) storage_id_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to tracker server %s:%d fail, " "send data to tracker server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -1471,7 +1471,7 @@ int tracker_get_storage_status(ConnectionInfo *pTrackerServer,
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1503,7 +1503,7 @@ int tracker_get_storage_status(ConnectionInfo *pTrackerServer,
if (in_bytes != sizeof(FDFSStorageBrief)) if (in_bytes != sizeof(FDFSStorageBrief))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -1559,7 +1559,7 @@ int tracker_get_storage_id(ConnectionInfo *pTrackerServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1590,7 +1590,7 @@ int tracker_get_storage_id(ConnectionInfo *pTrackerServer, \
if (in_bytes == 0 || in_bytes >= FDFS_STORAGE_ID_MAX_SIZE) if (in_bytes == 0 || in_bytes >= FDFS_STORAGE_ID_MAX_SIZE)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid", \ "length: %"PRId64" is invalid", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);

View File

@ -404,7 +404,7 @@ int fdht_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \ if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -418,7 +418,7 @@ int fdht_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes < 4) if (in_bytes < 4)
{ {
logError("server %s:%d reponse bytes: %d < 4", \ logError("server %s:%u reponse bytes: %d < 4", \
pServer->ip_addr, pServer->port, in_bytes); pServer->ip_addr, pServer->port, in_bytes);
result = EINVAL; result = EINVAL;
break; break;
@ -428,7 +428,7 @@ int fdht_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
4, g_fdht_network_timeout)) != 0) 4, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, \ pServer->port, \
@ -439,7 +439,7 @@ int fdht_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
vlen = buff2int(buff); vlen = buff2int(buff);
if (vlen != in_bytes - 4) if (vlen != in_bytes - 4)
{ {
logError("server %s:%d reponse bytes: %d " \ logError("server %s:%u reponse bytes: %d " \
"is not correct, %d != %d", pServer->ip_addr, \ "is not correct, %d != %d", pServer->ip_addr, \
pServer->port, in_bytes, vlen, in_bytes - 4); pServer->port, in_bytes, vlen, in_bytes - 4);
result = EINVAL; result = EINVAL;
@ -476,7 +476,7 @@ int fdht_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
*value_len, g_fdht_network_timeout)) != 0) *value_len, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, \ pServer->port, \
@ -613,7 +613,7 @@ int fdht_batch_set_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, pBuff, pkg_total_len, \ if ((result=tcpsenddata_nb(pServer->sock, pBuff, pkg_total_len, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -627,7 +627,7 @@ int fdht_batch_set_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes != 8 + 5 * key_count + total_key_len) if (in_bytes != 8 + 5 * key_count + total_key_len)
{ {
logError("server %s:%d reponse bytes: %d != %d", \ logError("server %s:%u reponse bytes: %d != %d", \
pServer->ip_addr, pServer->port, in_bytes, \ pServer->ip_addr, pServer->port, in_bytes, \
8 + 5 * key_count + total_key_len); 8 + 5 * key_count + total_key_len);
result = EINVAL; result = EINVAL;
@ -638,7 +638,7 @@ int fdht_batch_set_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
in_bytes, g_fdht_network_timeout)) != 0) in_bytes, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -649,7 +649,7 @@ int fdht_batch_set_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
{ {
result = EINVAL; result = EINVAL;
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, invalid key_count: %d, " \ "server: %s:%u, invalid key_count: %d, " \
"expect key count: %d", \ "expect key count: %d", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
buff2int(pBuff), key_count); buff2int(pBuff), key_count);
@ -766,7 +766,7 @@ int fdht_batch_delete_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \ if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -780,7 +780,7 @@ int fdht_batch_delete_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes != 8 + 5 * key_count + total_key_len) if (in_bytes != 8 + 5 * key_count + total_key_len)
{ {
logError("server %s:%d reponse bytes: %d != %d", \ logError("server %s:%u reponse bytes: %d != %d", \
pServer->ip_addr, pServer->port, in_bytes, \ pServer->ip_addr, pServer->port, in_bytes, \
8 + 5 * key_count + total_key_len); 8 + 5 * key_count + total_key_len);
result = EINVAL; result = EINVAL;
@ -791,7 +791,7 @@ int fdht_batch_delete_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
in_bytes, g_fdht_network_timeout)) != 0) in_bytes, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -802,7 +802,7 @@ int fdht_batch_delete_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
{ {
result = EINVAL; result = EINVAL;
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, invalid key_count: %d, " \ "server: %s:%u, invalid key_count: %d, " \
"expect key count: %d", \ "expect key count: %d", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
buff2int(buff), key_count); buff2int(buff), key_count);
@ -917,7 +917,7 @@ int fdht_batch_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \ if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -931,7 +931,7 @@ int fdht_batch_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes < 17) if (in_bytes < 17)
{ {
logError("server %s:%d reponse bytes: %d < 17", \ logError("server %s:%u reponse bytes: %d < 17", \
pServer->ip_addr, pServer->port, in_bytes); pServer->ip_addr, pServer->port, in_bytes);
result = EINVAL; result = EINVAL;
break; break;
@ -956,7 +956,7 @@ int fdht_batch_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
in_bytes, g_fdht_network_timeout)) != 0) in_bytes, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -967,7 +967,7 @@ int fdht_batch_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
{ {
result = EINVAL; result = EINVAL;
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, invalid key_count: %d, " \ "server: %s:%u, invalid key_count: %d, " \
"expect key count: %d", \ "expect key count: %d", \
__LINE__, pServer->ip_addr, pServer->port, \ __LINE__, pServer->ip_addr, pServer->port, \
buff2int(pInBuff), key_count); buff2int(pInBuff), key_count);
@ -1038,7 +1038,7 @@ int fdht_batch_get_ex1(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes != p - pInBuff) if (in_bytes != p - pInBuff)
{ {
*success_count = 0; *success_count = 0;
logError("server %s:%d reponse bytes: %d != %d", \ logError("server %s:%u reponse bytes: %d != %d", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
in_bytes, (int)(p - pInBuff)); in_bytes, (int)(p - pInBuff));
result = EINVAL; result = EINVAL;
@ -1193,7 +1193,7 @@ int fdht_inc_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \ if ((result=tcpsenddata_nb(pServer->sock, buff, p - buff, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1204,7 +1204,7 @@ int fdht_inc_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=fdht_recv_response(pServer, &in_buff, \ if ((result=fdht_recv_response(pServer, &in_buff, \
sizeof(buff), &in_bytes)) != 0) sizeof(buff), &in_bytes)) != 0)
{ {
logError("recv data from server %s:%d fail, " \ logError("recv data from server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1213,7 +1213,7 @@ int fdht_inc_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes < 4) if (in_bytes < 4)
{ {
logError("server %s:%d reponse bytes: %d < 4!", \ logError("server %s:%u reponse bytes: %d < 4!", \
pServer->ip_addr, pServer->port, in_bytes); pServer->ip_addr, pServer->port, in_bytes);
result = EINVAL; result = EINVAL;
break; break;
@ -1415,7 +1415,7 @@ int fdht_stat_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if ((result=tcpsenddata_nb(pServer->sock, &header, \ if ((result=tcpsenddata_nb(pServer->sock, &header, \
sizeof(header), g_fdht_network_timeout)) != 0) sizeof(header), g_fdht_network_timeout)) != 0)
{ {
logError("send data to server %s:%d fail, " \ logError("send data to server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -1429,7 +1429,7 @@ int fdht_stat_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
if (in_bytes >= size) if (in_bytes >= size)
{ {
logError("server %s:%d reponse bytes: %d >= " \ logError("server %s:%u reponse bytes: %d >= " \
"buff size: %d", pServer->ip_addr, \ "buff size: %d", pServer->ip_addr, \
pServer->port, in_bytes, size); pServer->port, in_bytes, size);
result = ENOSPC; result = ENOSPC;
@ -1440,7 +1440,7 @@ int fdht_stat_ex(GroupArray *pGroupArray, const bool bKeepAlive, \
in_bytes, g_fdht_network_timeout)) != 0) in_bytes, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, \ pServer->port, \

View File

@ -556,7 +556,7 @@ int fdht_load_groups_ex(IniContext *pIniContext, \
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"group: \"%s\", duplicate server: " \ "group: \"%s\", duplicate server: " \
"%s:%d", __LINE__, item_name, \ "%s:%u", __LINE__, item_name, \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
(*ppServer)->port); (*ppServer)->port);
return EINVAL; return EINVAL;

View File

@ -33,7 +33,7 @@ int fdht_recv_header(FDHTServerInfo *pServer, fdht_pkg_size_t *in_bytes)
sizeof(resp), g_fdht_network_timeout)) != 0) sizeof(resp), g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, \ pServer->port, \
@ -52,7 +52,7 @@ int fdht_recv_header(FDHTServerInfo *pServer, fdht_pkg_size_t *in_bytes)
if (*in_bytes < 0) if (*in_bytes < 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv package size %d " \ "server: %s:%u, recv package size %d " \
"is not correct", \ "is not correct", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, *in_bytes); pServer->port, *in_bytes);
@ -101,7 +101,7 @@ int fdht_recv_response(FDHTServerInfo *pServer, \
if (*in_bytes > buff_size) if (*in_bytes > buff_size)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv body bytes: %d" \ "server: %s:%u, recv body bytes: %d" \
" exceed max: %d", \ " exceed max: %d", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, *in_bytes, buff_size); pServer->port, *in_bytes, buff_size);
@ -116,7 +116,7 @@ int fdht_recv_response(FDHTServerInfo *pServer, \
*in_bytes, g_fdht_network_timeout)) != 0) *in_bytes, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server: %s:%d, recv data fail, " \ "server: %s:%u, recv data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, \ pServer->port, \
@ -193,7 +193,7 @@ int fdht_connect_server_nb(FDHTServerInfo *pServer, const int connect_timeout)
pServer->ip_addr, pServer->port, connect_timeout)) != 0) pServer->ip_addr, pServer->port, connect_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"connect to %s:%d fail, errno: %d, " \ "connect to %s:%u fail, errno: %d, " \
"error info: %s", __LINE__, pServer->ip_addr, \ "error info: %s", __LINE__, pServer->ip_addr, \
pServer->port, result, STRERROR(result)); pServer->port, result, STRERROR(result));
@ -227,7 +227,7 @@ int fdht_connect_server(FDHTServerInfo *pServer)
pServer->ip_addr, pServer->port)) != 0) pServer->ip_addr, pServer->port)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"connect to %s:%d fail, errno: %d, " \ "connect to %s:%u fail, errno: %d, " \
"error info: %s", __LINE__, pServer->ip_addr, \ "error info: %s", __LINE__, pServer->ip_addr, \
pServer->port, result, STRERROR(result)); pServer->port, result, STRERROR(result));
@ -293,7 +293,7 @@ int fdht_client_set(FDHTServerInfo *pServer, const char keep_alive, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to server %s:%d fail, " \ "send data to server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -306,7 +306,7 @@ int fdht_client_set(FDHTServerInfo *pServer, const char keep_alive, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to server %s:%d fail, " \ "send data to server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -317,7 +317,7 @@ int fdht_client_set(FDHTServerInfo *pServer, const char keep_alive, \
value_len, g_fdht_network_timeout)) != 0) value_len, g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to server %s:%d fail, " \ "send data to server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -328,7 +328,7 @@ int fdht_client_set(FDHTServerInfo *pServer, const char keep_alive, \
if ((result=fdht_recv_header(pServer, &in_bytes)) != 0) if ((result=fdht_recv_header(pServer, &in_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"recv data from server %s:%d fail, " \ "recv data from server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -338,7 +338,7 @@ int fdht_client_set(FDHTServerInfo *pServer, const char keep_alive, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server %s:%d reponse bytes: %d != 0", \ "server %s:%u reponse bytes: %d != 0", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, in_bytes); pServer->port, in_bytes);
return EINVAL; return EINVAL;
@ -384,7 +384,7 @@ int fdht_client_delete(FDHTServerInfo *pServer, const char keep_alive, \
g_fdht_network_timeout)) != 0) g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to server %s:%d fail, " \ "send data to server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -396,7 +396,7 @@ int fdht_client_delete(FDHTServerInfo *pServer, const char keep_alive, \
if (result == ENOENT) if (result == ENOENT)
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"recv data from server %s:%d fail, " \ "recv data from server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -404,7 +404,7 @@ int fdht_client_delete(FDHTServerInfo *pServer, const char keep_alive, \
else else
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"recv data from server %s:%d fail, " \ "recv data from server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -416,7 +416,7 @@ int fdht_client_delete(FDHTServerInfo *pServer, const char keep_alive, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server %s:%d reponse bytes: %d != 0", \ "server %s:%u reponse bytes: %d != 0", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, in_bytes); pServer->port, in_bytes);
return EINVAL; return EINVAL;
@ -439,7 +439,7 @@ int fdht_client_heart_beat(FDHTServerInfo *pServer)
sizeof(header), g_fdht_network_timeout)) != 0) sizeof(header), g_fdht_network_timeout)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to server %s:%d fail, " \ "send data to server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -449,7 +449,7 @@ int fdht_client_heart_beat(FDHTServerInfo *pServer)
if ((result=fdht_recv_header(pServer, &in_bytes)) != 0) if ((result=fdht_recv_header(pServer, &in_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"recv data from server %s:%d fail, " \ "recv data from server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pServer->ip_addr, pServer->port, \ pServer->ip_addr, pServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -459,7 +459,7 @@ int fdht_client_heart_beat(FDHTServerInfo *pServer)
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"server %s:%d reponse bytes: %d != 0", \ "server %s:%u reponse bytes: %d != 0", \
__LINE__, pServer->ip_addr, \ __LINE__, pServer->ip_addr, \
pServer->port, in_bytes); pServer->port, in_bytes);
return EINVAL; return EINVAL;

View File

@ -143,7 +143,7 @@ static int storage_do_fetch_binlog(ConnectionInfo *pSrcStorage, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"storage server %s:%d, send data fail, " "storage server %s:%u, send data fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, pSrcStorage->ip_addr, pSrcStorage->port, __LINE__, pSrcStorage->ip_addr, pSrcStorage->port,
result, STRERROR(result)); result, STRERROR(result));
@ -171,7 +171,7 @@ static int storage_do_fetch_binlog(ConnectionInfo *pSrcStorage, \
in_bytes, 0, network_timeout, &file_bytes)) != 0) in_bytes, 0, network_timeout, &file_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"storage server %s:%d, tcprecvfile fail, " "storage server %s:%u, tcprecvfile fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, pSrcStorage->ip_addr, pSrcStorage->port, __LINE__, pSrcStorage->ip_addr, pSrcStorage->port,
result, STRERROR(result)); result, STRERROR(result));
@ -179,7 +179,7 @@ static int storage_do_fetch_binlog(ConnectionInfo *pSrcStorage, \
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"recovery binlog from %s:%d, file size: %"PRId64, __LINE__, "recovery binlog from %s:%u, file size: %"PRId64, __LINE__,
pSrcStorage->ip_addr, pSrcStorage->port, file_bytes); pSrcStorage->ip_addr, pSrcStorage->port, file_bytes);
return 0; return 0;
@ -357,7 +357,7 @@ static int recovery_get_src_storage_server(ConnectionInfo *pSrcStorage)
} }
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"disk recovery: get source storage server %s:%d", "disk recovery: get source storage server %s:%u",
__LINE__, pSrcStorage->ip_addr, pSrcStorage->port); __LINE__, pSrcStorage->ip_addr, pSrcStorage->port);
return 0; return 0;
} }
@ -738,7 +738,7 @@ static int storage_do_recovery(RecoveryThreadData *pThreadData,
result = 0; result = 0;
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"disk recovery thread #%d, src storage server %s:%d, " "disk recovery thread #%d, src storage server %s:%u, "
"recovering files of data path: %s ...", __LINE__, "recovering files of data path: %s ...", __LINE__,
pThreadData->thread_index, pSrcStorage->ip_addr, pThreadData->thread_index, pSrcStorage->ip_addr,
pSrcStorage->port, pThreadData->base_path); pSrcStorage->port, pThreadData->base_path);
@ -925,7 +925,7 @@ static int storage_do_recovery(RecoveryThreadData *pThreadData,
if (pThreadData->done) if (pThreadData->done)
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"disk recovery thread #%d, src storage server %s:%d, " "disk recovery thread #%d, src storage server %s:%u, "
"recover files of data path: %s done", __LINE__, "recover files of data path: %s done", __LINE__,
pThreadData->thread_index, pSrcStorage->ip_addr, pThreadData->thread_index, pSrcStorage->ip_addr,
pSrcStorage->port, pThreadData->base_path); pSrcStorage->port, pThreadData->base_path);
@ -1749,7 +1749,7 @@ int storage_disk_recovery_prepare(const int store_path_index)
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"try to fetch binlog from %s:%d ...", __LINE__, "try to fetch binlog from %s:%u ...", __LINE__,
pStorageConn->ip_addr, pStorageConn->port); pStorageConn->ip_addr, pStorageConn->port);
result = storage_do_fetch_binlog(pStorageConn, store_path_index); result = storage_do_fetch_binlog(pStorageConn, store_path_index);
@ -1760,7 +1760,7 @@ int storage_disk_recovery_prepare(const int store_path_index)
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"fetch binlog from %s:%d successfully.", __LINE__, "fetch binlog from %s:%u successfully.", __LINE__,
pStorageConn->ip_addr, pStorageConn->port); pStorageConn->ip_addr, pStorageConn->port);
if ((result=storage_disk_recovery_split_trunk_binlog( if ((result=storage_disk_recovery_split_trunk_binlog(

View File

@ -115,7 +115,7 @@ static int fdfs_dump_global_vars(char *buff, const int buffSize)
"g_store_path_index=%d\n" "g_store_path_index=%d\n"
"g_current_trunk_file_id=%d\n" "g_current_trunk_file_id=%d\n"
"g_trunk_sync_thread_count=%d\n" "g_trunk_sync_thread_count=%d\n"
"g_trunk_server=%s:%d\n" "g_trunk_server=%s:%u\n"
"g_trunk_total_free_space=%"PRId64"\n" "g_trunk_total_free_space=%"PRId64"\n"
"g_use_connection_pool=%d\n" "g_use_connection_pool=%d\n"
"g_connection_pool_max_idle_time=%d\n" "g_connection_pool_max_idle_time=%d\n"
@ -286,7 +286,7 @@ static int fdfs_dump_tracker_servers(char *buff, const int buffSize)
pTrackerServer<pTrackerEnd; pTrackerServer++) pTrackerServer<pTrackerEnd; pTrackerServer++)
{ {
total_len += snprintf(buff + total_len, buffSize - total_len, total_len += snprintf(buff + total_len, buffSize - total_len,
"\t%d. tracker server=%s:%d\n", "\t%d. tracker server=%s:%u\n",
(int)(pTrackerServer - g_tracker_group.servers) + 1, (int)(pTrackerServer - g_tracker_group.servers) + 1,
pTrackerServer->connections[0].ip_addr, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port); pTrackerServer->connections[0].port);

View File

@ -155,7 +155,7 @@ static int storage_do_get_group_name(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -176,7 +176,7 @@ static int storage_do_get_group_name(ConnectionInfo *pTrackerServer)
if (in_bytes != FDFS_GROUP_NAME_MAX_LEN) if (in_bytes != FDFS_GROUP_NAME_MAX_LEN)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv body length: " \ "tracker server %s:%u, recv body length: " \
"%"PRId64" != %d", \ "%"PRId64" != %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes, FDFS_GROUP_NAME_MAX_LEN); pTrackerServer->port, in_bytes, FDFS_GROUP_NAME_MAX_LEN);
@ -1353,11 +1353,11 @@ static int storage_check_tracker_ipaddr(const char *filename)
conn_end = pServer->connections + pServer->count; conn_end = pServer->connections + pServer->count;
for (conn=pServer->connections; conn<conn_end; conn++) for (conn=pServer->connections; conn<conn_end; conn++)
{ {
//logInfo("server=%s:%d\n", conn->ip_addr, conn->port); //logInfo("server=%s:%u\n", conn->ip_addr, conn->port);
if (strcmp(conn->ip_addr, "127.0.0.1") == 0) if (strcmp(conn->ip_addr, "127.0.0.1") == 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"conf file \"%s\", tracker: \"%s:%d\" is invalid, " "conf file \"%s\", tracker: \"%s:%u\" is invalid, "
"tracker server ip can't be 127.0.0.1", "tracker server ip can't be 127.0.0.1",
__LINE__, filename, conn->ip_addr, conn->port); __LINE__, filename, conn->ip_addr, conn->port);
return EINVAL; return EINVAL;
@ -2201,7 +2201,7 @@ static int storage_get_my_ip_from_tracker(ConnectionInfo *conn,
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, send data fail, " "tracker server %s:%u, send data fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, conn->ip_addr, conn->port, __LINE__, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -2212,7 +2212,7 @@ static int storage_get_my_ip_from_tracker(ConnectionInfo *conn,
buff_size - 1, &in_bytes)) != 0) buff_size - 1, &in_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, recv response fail, " "tracker server %s:%u, recv response fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, conn->ip_addr, conn->port, __LINE__, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -2259,7 +2259,7 @@ int storage_set_tracker_client_ips(ConnectionInfo *conn,
error_info, sizeof(error_info))) != 0) error_info, sizeof(error_info))) != 0)
{ {
logCrit("file: "__FILE__", line: %d, " logCrit("file: "__FILE__", line: %d, "
"as a client of tracker server %s:%d, " "as a client of tracker server %s:%u, "
"my ip: %s not valid, error info: %s. " "my ip: %s not valid, error info: %s. "
"program exit!", __LINE__, "program exit!", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,
@ -2277,7 +2277,7 @@ int storage_set_tracker_client_ips(ConnectionInfo *conn,
fdfs_multi_ips_to_string(&g_tracker_client_ip, fdfs_multi_ips_to_string(&g_tracker_client_ip,
ip_str, sizeof(ip_str)); ip_str, sizeof(ip_str));
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"as a client of tracker server %s:%d, " "as a client of tracker server %s:%u, "
"my ip: %s not consistent with client ips: %s " "my ip: %s not consistent with client ips: %s "
"of other tracker client. program exit!", __LINE__, "of other tracker client. program exit!", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,

View File

@ -48,7 +48,7 @@ static int storage_do_changelog_req(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -84,7 +84,7 @@ static int storage_report_ip_changed(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -109,7 +109,7 @@ static int storage_report_ip_changed(ConnectionInfo *pTrackerServer)
else else
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, recv data fail or " "tracker server %s:%u, recv data fail or "
"response status != 0, " "response status != 0, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTrackerServer->ip_addr, __LINE__, pTrackerServer->ip_addr,
@ -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, &result, false); g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
&result, false);
if (conn != NULL) if (conn != NULL)
{ {
break; break;
@ -158,7 +159,7 @@ int storage_get_my_tracker_client_ip()
if (conn == NULL) if (conn == NULL)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, " "connect to tracker server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTServer->connections[0].ip_addr, __LINE__, pTServer->connections[0].ip_addr,
pTServer->connections[0].port, pTServer->connections[0].port,
@ -233,7 +234,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, &result, false); g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
&result, false);
if (conn != NULL) if (conn != NULL)
{ {
break; break;
@ -245,7 +247,7 @@ static int storage_report_storage_ip_addr()
if (conn == NULL) if (conn == NULL)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, " "connect to tracker server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTServer->connections[0].ip_addr, __LINE__, pTServer->connections[0].ip_addr,
pTServer->connections[0].port, pTServer->connections[0].port,
@ -302,7 +304,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, &result, false); g_client_bind_addr ? SF_G_INNER_BIND_ADDR : NULL,
&result, false);
if (conn != NULL) if (conn != NULL)
{ {
break; break;
@ -314,7 +317,7 @@ int storage_changelog_req()
if (conn == NULL) if (conn == NULL)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, " "connect to tracker server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTServer->connections[0].ip_addr, __LINE__, pTServer->connections[0].ip_addr,
pTServer->connections[0].port, pTServer->connections[0].port,

View File

@ -146,7 +146,7 @@ static int storage_sync_copy_file(ConnectionInfo *pStorageServer, \
{ {
logDebug("file: "__FILE__", line: %d, " \ logDebug("file: "__FILE__", line: %d, " \
"sync data file, logic file: %s " \ "sync data file, logic file: %s " \
"on dest server %s:%d already exists, "\ "on dest server %s:%u already exists, "\
"and same as mine, ignore it", \ "and same as mine, ignore it", \
__LINE__, pRecord->filename, \ __LINE__, pRecord->filename, \
pStorageServer->ip_addr, \ pStorageServer->ip_addr, \
@ -157,7 +157,7 @@ static int storage_sync_copy_file(ConnectionInfo *pStorageServer, \
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"sync data file, logic file: %s " \ "sync data file, logic file: %s " \
"on dest server %s:%d already exists, "\ "on dest server %s:%u already exists, "\
"but file size: %"PRId64 \ "but file size: %"PRId64 \
" not same as mine: %"PRId64 \ " not same as mine: %"PRId64 \
", need re-sync it", __LINE__, \ ", need re-sync it", __LINE__, \
@ -230,7 +230,7 @@ static int storage_sync_copy_file(ConnectionInfo *pStorageServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"sync data to storage server %s:%d fail, " \ "sync data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -245,7 +245,7 @@ static int storage_sync_copy_file(ConnectionInfo *pStorageServer, \
SF_G_NETWORK_TIMEOUT, &total_send_bytes)) != 0)) SF_G_NETWORK_TIMEOUT, &total_send_bytes)) != 0))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"sync data to storage server %s:%d fail, " \ "sync data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -279,7 +279,7 @@ static int storage_sync_copy_file(ConnectionInfo *pStorageServer, \
STORAGE_OP_TYPE_SOURCE_CREATE_FILE) STORAGE_OP_TYPE_SOURCE_CREATE_FILE)
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"storage server ip: %s:%d, data file: %s " \ "storage server ip: %s:%u, data file: %s " \
"already exists, maybe some mistake?", \ "already exists, maybe some mistake?", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, pRecord->filename); pStorageServer->port, pRecord->filename);
@ -427,7 +427,7 @@ static int storage_sync_modify_file(ConnectionInfo *pStorageServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"sync data to storage server %s:%d fail, " \ "sync data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -441,7 +441,7 @@ static int storage_sync_modify_file(ConnectionInfo *pStorageServer, \
SF_G_NETWORK_TIMEOUT, &total_send_bytes)) != 0) SF_G_NETWORK_TIMEOUT, &total_send_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"sync data to storage server %s:%d fail, " \ "sync data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -592,7 +592,7 @@ static int storage_sync_truncate_file(ConnectionInfo *pStorageServer, \
p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0) p - out_buff, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"sync data to storage server %s:%d fail, " \ "sync data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -666,7 +666,7 @@ static int storage_sync_delete_file(ConnectionInfo *pStorageServer, \
pRecord->filename_len, SF_G_NETWORK_TIMEOUT)) != 0) pRecord->filename_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " \ logError("FILE: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -716,7 +716,7 @@ static int storage_report_my_server_id(ConnectionInfo *pStorageServer)
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " \ logError("FILE: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -941,7 +941,7 @@ static int storage_sync_link_file(ConnectionInfo *pStorageServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " \ logError("FILE: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -1049,7 +1049,7 @@ static int storage_sync_rename_file(ConnectionInfo *pStorageServer,
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " logError("FILE: "__FILE__", line: %d, "
"send data to storage server %s:%d fail, " "send data to storage server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pStorageServer->ip_addr, __LINE__, pStorageServer->ip_addr,
pStorageServer->port, result, STRERROR(result)); pStorageServer->port, result, STRERROR(result));
@ -1069,7 +1069,7 @@ static int storage_sync_rename_file(ConnectionInfo *pStorageServer,
else if (result == EEXIST) else if (result == EEXIST)
{ {
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"storage server ip: %s:%d, data file: %s " "storage server ip: %s:%u, data file: %s "
"already exists", __LINE__, pStorageServer->ip_addr, "already exists", __LINE__, pStorageServer->ip_addr,
pStorageServer->port, pRecord->filename); pStorageServer->port, pRecord->filename);
return 0; return 0;
@ -2060,7 +2060,7 @@ int storage_report_storage_status(const char *storage_id, \
if (conn == NULL) if (conn == NULL)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, " "connect to tracker server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTServer->connections[0].ip_addr, __LINE__, pTServer->connections[0].ip_addr,
pTServer->connections[0].port, pTServer->connections[0].port,
@ -2882,14 +2882,14 @@ static void storage_sync_thread_exit(ConnectionInfo *pStorage)
if ((result=pthread_mutex_unlock(&sync_thread_lock)) != 0) if ((result=pthread_mutex_unlock(&sync_thread_lock)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, "
"call pthread_mutex_unlock fail, " \ "call pthread_mutex_unlock fail, "
"errno: %d, error info: %s", \ "errno: %d, error info: %s",
__LINE__, result, STRERROR(result)); __LINE__, result, STRERROR(result));
} }
logDebug("file: "__FILE__", line: %d, " \ logDebug("file: "__FILE__", line: %d, "
"sync thread to storage server %s:%d exit", "sync thread to storage server %s:%u exit",
__LINE__, pStorage->ip_addr, pStorage->port); __LINE__, pStorage->ip_addr, pStorage->port);
} }
@ -2937,8 +2937,8 @@ static void* storage_sync_thread_entrance(void* arg)
start_time = 0; start_time = 0;
end_time = 0; end_time = 0;
logDebug("file: "__FILE__", line: %d, " \ logDebug("file: "__FILE__", line: %d, "
"sync thread to storage server %s:%d started", \ "sync thread to storage server %s:%u started",
__LINE__, storage_server.ip_addr, storage_server.port); __LINE__, storage_server.ip_addr, storage_server.port);
while (SF_G_CONTINUE_FLAG && \ while (SF_G_CONTINUE_FLAG && \

View File

@ -111,7 +111,7 @@ void storage_sync_connect_storage_server_ex(const FDFSStorageBrief *pStorage,
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"successfully connect to " "successfully connect to "
"storage server %s:%d%s", __LINE__, "storage server %s:%u%s", __LINE__,
conn->ip_addr, SF_G_INNER_PORT, szFailPrompt); conn->ip_addr, SF_G_INNER_PORT, szFailPrompt);
nContinuousFail = 0; nContinuousFail = 0;
break; break;
@ -121,7 +121,7 @@ void storage_sync_connect_storage_server_ex(const FDFSStorageBrief *pStorage,
if (previousCodes[i] != conn_results[i]) if (previousCodes[i] != conn_results[i])
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to storage server %s:%d fail, " "connect to storage server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, conn->ip_addr, SF_G_INNER_PORT, __LINE__, conn->ip_addr, SF_G_INNER_PORT,
conn_results[i], STRERROR(conn_results[i])); conn_results[i], STRERROR(conn_results[i]));
@ -147,7 +147,7 @@ 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++)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to storage server %s:%d fail, " "connect to storage server %s:%u fail, "
"try count: %d, errno: %d, error info: %s", "try count: %d, errno: %d, error info: %s",
__LINE__, ip_addrs.ips[i].address, SF_G_INNER_PORT, avg_fails, __LINE__, ip_addrs.ips[i].address, SF_G_INNER_PORT, avg_fails,
conn_results[i], STRERROR(conn_results[i])); conn_results[i], STRERROR(conn_results[i]));

View File

@ -168,7 +168,7 @@ static void thracker_report_thread_exit(TrackerServerInfo *pTrackerServer)
} }
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"report thread to tracker server %s:%d exit", "report thread to tracker server %s:%u exit",
__LINE__, pTrackerServer->connections[0].ip_addr, __LINE__, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port); pTrackerServer->connections[0].port);
} }
@ -225,7 +225,7 @@ static void *tracker_report_thread_entrance(void *arg)
tracker_index = pTrackerServer - g_tracker_group.servers; tracker_index = pTrackerServer - g_tracker_group.servers;
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"report thread to tracker server %s:%d started", "report thread to tracker server %s:%u started",
__LINE__, pTrackerServer->connections[0].ip_addr, __LINE__, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port); pTrackerServer->connections[0].port);
@ -255,7 +255,7 @@ static void *tracker_report_thread_entrance(void *arg)
if (previousCode != result) if (previousCode != result)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, " "connect to tracker server %s:%u fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTrackerServer->connections[0].ip_addr, __LINE__, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port, pTrackerServer->connections[0].port,
@ -294,7 +294,7 @@ static void *tracker_report_thread_entrance(void *arg)
nContinuousFail); nContinuousFail);
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"successfully connect to tracker server %s:%d%s, " "successfully connect to tracker server %s:%u%s, "
"as a tracker client, my ip is %s", "as a tracker client, my ip is %s",
__LINE__, conn->ip_addr, conn->port, __LINE__, conn->ip_addr, conn->port,
szFailPrompt, fdfs_get_ipaddr_by_peer_ip( szFailPrompt, fdfs_get_ipaddr_by_peer_ip(
@ -541,7 +541,7 @@ static void *tracker_report_thread_entrance(void *arg)
if (nContinuousFail > 0) if (nContinuousFail > 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"connect to tracker server %s:%d fail, try count: %d" "connect to tracker server %s:%u fail, try count: %d"
", errno: %d, error info: %s", ", errno: %d, error info: %s",
__LINE__, pTrackerServer->connections[0].ip_addr, __LINE__, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port, nContinuousFail, pTrackerServer->connections[0].port, nContinuousFail,
@ -613,7 +613,7 @@ int tracker_sync_diff_servers(ConnectionInfo *pTrackerServer, \
SF_G_NETWORK_TIMEOUT)) != 0) SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"trackert server %s:%d, send data fail, " \ "trackert server %s:%u, send data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -624,7 +624,7 @@ int tracker_sync_diff_servers(ConnectionInfo *pTrackerServer, \
briefServers, out_len, SF_G_NETWORK_TIMEOUT)) != 0) briefServers, out_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"trackert server %s:%d, send data fail, " \ "trackert server %s:%u, send data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -636,7 +636,7 @@ int tracker_sync_diff_servers(ConnectionInfo *pTrackerServer, \
sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv data fail, " \ "tracker server %s:%u, recv data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -647,7 +647,7 @@ int tracker_sync_diff_servers(ConnectionInfo *pTrackerServer, \
FDFS_PROTO_PKG_LEN_SIZE) != 0) FDFS_PROTO_PKG_LEN_SIZE) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"expect pkg len 0, but recv pkg len != 0", \ "expect pkg len 0, but recv pkg len != 0", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port); pTrackerServer->port);
@ -680,7 +680,7 @@ int tracker_report_storage_status(ConnectionInfo *pTrackerServer, \
sizeof(FDFSStorageBrief), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(FDFSStorageBrief), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"trackert server %s:%d, send data fail, " \ "trackert server %s:%u, send data fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -691,7 +691,7 @@ int tracker_report_storage_status(ConnectionInfo *pTrackerServer, \
sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv data fail, " \ "tracker server %s:%u, recv data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -702,7 +702,7 @@ int tracker_report_storage_status(ConnectionInfo *pTrackerServer, \
FDFS_PROTO_PKG_LEN_SIZE) != 0) FDFS_PROTO_PKG_LEN_SIZE) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"expect pkg len 0, but recv pkg len != 0", \ "expect pkg len 0, but recv pkg len != 0", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port); pTrackerServer->port);
@ -887,7 +887,7 @@ static int tracker_merge_servers(ConnectionInfo *pTrackerServer,
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"tracker response status: %d, " \ "tracker response status: %d, " \
"local status: %d, need rejoin " \ "local status: %d, need rejoin " \
"tracker server: %s:%d", \ "tracker server: %s:%u", \
__LINE__, pServer->status, \ __LINE__, pServer->status, \
(*ppFound)->server.status, \ (*ppFound)->server.status, \
pTrackerServer->ip_addr, pTrackerServer->ip_addr,
@ -945,7 +945,7 @@ static int tracker_merge_servers(ConnectionInfo *pTrackerServer,
else else
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"storage servers of group \"%s\" " \ "storage servers of group \"%s\" " \
"exceeds max: %d", \ "exceeds max: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -999,7 +999,7 @@ static int tracker_merge_servers(ConnectionInfo *pTrackerServer,
&& pServer->status != FDFS_STORAGE_STATUS_IP_CHANGED) && pServer->status != FDFS_STORAGE_STATUS_IP_CHANGED)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"group \"%s\", " \ "group \"%s\", " \
"enter impossible statement branch", \ "enter impossible statement branch", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1052,7 +1052,7 @@ static int _notify_reselect_tleader(ConnectionInfo *conn)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, send data fail, " "tracker server %s:%u, send data fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, conn->ip_addr, conn->port, __LINE__, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -1070,7 +1070,7 @@ static int _notify_reselect_tleader(ConnectionInfo *conn)
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, recv body length: " "tracker server %s:%u, recv body length: "
"%"PRId64" != 0", __LINE__, conn->ip_addr, "%"PRId64" != 0", __LINE__, conn->ip_addr,
conn->port, in_bytes); conn->port, in_bytes);
return EINVAL; return EINVAL;
@ -1128,8 +1128,8 @@ static void set_tracker_leader(const int leader_index)
memcpy(&new_leader_server, g_tracker_group.servers + leader_index, memcpy(&new_leader_server, g_tracker_group.servers + leader_index,
sizeof(TrackerServerInfo)); sizeof(TrackerServerInfo));
logWarning("file: "__FILE__", line: %d, " logWarning("file: "__FILE__", line: %d, "
"two tracker leaders occur, old leader is %s:%d, " "two tracker leaders occur, old leader is %s:%u, "
"new leader is %s:%d, notify to re-select " "new leader is %s:%u, notify to re-select "
"tracker leader", __LINE__, "tracker leader", __LINE__,
old_leader_server.connections[0].ip_addr, old_leader_server.connections[0].ip_addr,
old_leader_server.connections[0].port, old_leader_server.connections[0].port,
@ -1169,7 +1169,7 @@ static void get_tracker_leader()
check_my_status_for_all_trackers(); check_my_status_for_all_trackers();
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"the tracker server leader is #%d. %s:%d", "the tracker server leader is #%d. %s:%u",
__LINE__, i, tracker_server.connections[0].ip_addr, __LINE__, i, tracker_server.connections[0].ip_addr,
tracker_server.connections[0].port); tracker_server.connections[0].port);
break; break;
@ -1291,7 +1291,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(resp), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv data fail, " \ "tracker server %s:%u, recv data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1315,7 +1315,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
sizeof(FDFSStorageBrief) != 0)) sizeof(FDFSStorageBrief) != 0))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"package size %"PRId64" is not correct", \ "package size %"PRId64" is not correct", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, nInPackLen); pTrackerServer->port, nInPackLen);
@ -1325,7 +1325,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (nInPackLen > sizeof(in_buff)) if (nInPackLen > sizeof(in_buff))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, package size " \ "tracker server %s:%u, package size " \
"%"PRId64" is too large, " \ "%"PRId64" is too large, " \
"exceed max: %d", \ "exceed max: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1338,7 +1338,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
nInPackLen, SF_G_NETWORK_TIMEOUT)) != 0) nInPackLen, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv data fail, " \ "tracker server %s:%u, recv data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1358,7 +1358,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (server_count < 1) if (server_count < 1)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, response server " \ "tracker server %s:%u, response server " \
"count: %d < 1", __LINE__, \ "count: %d < 1", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, server_count); pTrackerServer->port, server_count);
@ -1378,8 +1378,8 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
pTrackerLeader = g_tracker_group.servers + pTrackerLeader = g_tracker_group.servers +
g_tracker_group.leader_index; g_tracker_group.leader_index;
logWarning("file: "__FILE__", line: %d, " logWarning("file: "__FILE__", line: %d, "
"tracker server %s:%d, " "tracker server %s:%u, "
"my tracker leader is: %s:%d, " "my tracker leader is: %s:%u, "
"but response tracker leader is null", "but response tracker leader is null",
__LINE__, pTrackerServer->ip_addr, __LINE__, pTrackerServer->ip_addr,
pTrackerServer->port, pTrackerLeader->connections[0].ip_addr, pTrackerServer->port, pTrackerLeader->connections[0].ip_addr,
@ -1397,8 +1397,8 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (leader_index < 0) if (leader_index < 0)
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"response tracker leader: %s:%d" \ "response tracker leader: %s:%u" \
" not exist in local", __LINE__, \ " not exist in local", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, tracker_leader_ip, \ pTrackerServer->port, tracker_leader_ip, \
@ -1407,8 +1407,8 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
else else
{ {
logInfo("file: "__FILE__", line: %d, " \ logInfo("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"set tracker leader: %s:%d", __LINE__, \ "set tracker leader: %s:%u", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port,\ pTrackerServer->ip_addr, pTrackerServer->port,\
tracker_leader_ip, tracker_leader_port); tracker_leader_ip, tracker_leader_port);
@ -1427,7 +1427,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (server_count < 1) if (server_count < 1)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, response server " \ "tracker server %s:%u, response server " \
"count: %d < 1", __LINE__, \ "count: %d < 1", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, server_count); pTrackerServer->port, server_count);
@ -1445,7 +1445,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (!g_if_use_trunk_file) if (!g_if_use_trunk_file)
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"my g_if_use_trunk_file is false, " \ "my g_if_use_trunk_file is false, " \
"can't support trunk server!", \ "can't support trunk server!", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1466,14 +1466,14 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
if (g_if_trunker_self) if (g_if_trunker_self)
{ {
logWarning("file: "__FILE__", line: %d, " logWarning("file: "__FILE__", line: %d, "
"I am already the trunk server %s:%d, " "I am already the trunk server %s:%u, "
"may be the tracker server restart", "may be the tracker server restart",
__LINE__, pBriefServers->ip_addr, port); __LINE__, pBriefServers->ip_addr, port);
} }
else else
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"I am the the trunk server %s:%d", __LINE__, "I am the the trunk server %s:%u", __LINE__,
pBriefServers->ip_addr, port); pBriefServers->ip_addr, port);
if ((result=do_set_trunk_server_myself(pTrackerServer)) != 0) if ((result=do_set_trunk_server_myself(pTrackerServer)) != 0)
@ -1485,7 +1485,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
else else
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"the trunk server is %s:%d", __LINE__, "the trunk server is %s:%u", __LINE__,
g_trunk_server.connections[0].ip_addr, g_trunk_server.connections[0].ip_addr,
g_trunk_server.connections[0].port); g_trunk_server.connections[0].port);
@ -1493,7 +1493,7 @@ static int tracker_check_response(ConnectionInfo *pTrackerServer,
{ {
logWarning("file: "__FILE__", line: %d, " \ logWarning("file: "__FILE__", line: %d, " \
"I am the old trunk server, " \ "I am the old trunk server, " \
"the new trunk server is %s:%d", \ "the new trunk server is %s:%u", \
__LINE__, g_trunk_server.connections[0].ip_addr, \ __LINE__, g_trunk_server.connections[0].ip_addr, \
g_trunk_server.connections[0].port); g_trunk_server.connections[0].port);
@ -1584,7 +1584,7 @@ int tracker_sync_src_req(ConnectionInfo *pTrackerServer, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1613,7 +1613,7 @@ int tracker_sync_src_req(ConnectionInfo *pTrackerServer, \
if (in_bytes != sizeof(syncReqbody)) if (in_bytes != sizeof(syncReqbody))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"recv body length: %"PRId64" is invalid, " \ "recv body length: %"PRId64" is invalid, " \
"expect body length: %d", \ "expect body length: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1646,7 +1646,7 @@ static int tracker_sync_dest_req(ConnectionInfo *pTrackerServer)
sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1672,7 +1672,7 @@ static int tracker_sync_dest_req(ConnectionInfo *pTrackerServer)
if (in_bytes != sizeof(syncReqbody)) if (in_bytes != sizeof(syncReqbody))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"recv body length: %"PRId64" is invalid, " \ "recv body length: %"PRId64" is invalid, " \
"expect body length: %d", \ "expect body length: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1703,7 +1703,7 @@ static int tracker_sync_dest_query(ConnectionInfo *pTrackerServer)
sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(header), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1731,7 +1731,7 @@ static int tracker_sync_dest_query(ConnectionInfo *pTrackerServer)
if (in_bytes != sizeof(syncReqbody)) if (in_bytes != sizeof(syncReqbody))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"recv body length: %"PRId64" is invalid, " \ "recv body length: %"PRId64" is invalid, " \
"expect body length: %d", \ "expect body length: %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -1765,7 +1765,7 @@ static int tracker_report_trunk_fid(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1784,7 +1784,7 @@ static int tracker_report_trunk_fid(ConnectionInfo *pTrackerServer)
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv body length: " \ "tracker server %s:%u, recv body length: " \
"%"PRId64" != 0", \ "%"PRId64" != 0", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -1811,7 +1811,7 @@ static int tracker_report_trunk_free_space(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1830,7 +1830,7 @@ static int tracker_report_trunk_free_space(ConnectionInfo *pTrackerServer)
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv body length: " \ "tracker server %s:%u, recv body length: " \
"%"PRId64" != 0", \ "%"PRId64" != 0", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -1857,7 +1857,7 @@ static int tracker_fetch_trunk_fid(ConnectionInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1878,7 +1878,7 @@ static int tracker_fetch_trunk_fid(ConnectionInfo *pTrackerServer)
if (in_bytes != sizeof(in_buff)) if (in_bytes != sizeof(in_buff))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv body length: " \ "tracker server %s:%u, recv body length: " \
"%"PRId64" != %d", \ "%"PRId64" != %d", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes, (int)sizeof(in_buff)); pTrackerServer->port, in_bytes, (int)sizeof(in_buff));
@ -1889,7 +1889,7 @@ static int tracker_fetch_trunk_fid(ConnectionInfo *pTrackerServer)
if (trunk_fid < 0) if (trunk_fid < 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, " \ "tracker server %s:%u, " \
"trunk file id: %d is invalid!", \ "trunk file id: %d is invalid!", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, trunk_fid); pTrackerServer->port, trunk_fid);
@ -1931,7 +1931,7 @@ static int tracker_sync_notify(ConnectionInfo *pTrackerServer, const int tracker
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -1970,7 +1970,7 @@ static int tracker_sync_notify(ConnectionInfo *pTrackerServer, const int tracker
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv body length: " \ "tracker server %s:%u, recv body length: " \
"%"PRId64" != 0", \ "%"PRId64" != 0", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
@ -2040,7 +2040,7 @@ int tracker_report_join(ConnectionInfo *pTrackerServer, \
if (g_my_report_status[i].my_result == -1) if (g_my_report_status[i].my_result == -1)
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"tracker server: #%d. %s:%d, " "tracker server: #%d. %s:%u, "
"my_report_result: %d", __LINE__, i, "my_report_result: %d", __LINE__, i,
g_tracker_group.servers[i].connections[0].ip_addr, g_tracker_group.servers[i].connections[0].ip_addr,
g_tracker_group.servers[i].connections[0].port, g_tracker_group.servers[i].connections[0].port,
@ -2081,7 +2081,7 @@ int tracker_report_join(ConnectionInfo *pTrackerServer, \
out_len, SF_G_NETWORK_TIMEOUT)) != 0) out_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -2104,7 +2104,7 @@ int tracker_report_join(ConnectionInfo *pTrackerServer, \
if (in_bytes != sizeof(respBody)) if (in_bytes != sizeof(respBody))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, recv data fail, " \ "tracker server %s:%u, recv data fail, " \
"expect %d bytes, but recv " \ "expect %d bytes, but recv " \
"%"PRId64" bytes", \ "%"PRId64" bytes", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
@ -2165,7 +2165,7 @@ static int tracker_report_sync_timestamp(ConnectionInfo *pTrackerServer,
sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -2276,7 +2276,7 @@ static int tracker_report_df_stat(ConnectionInfo *pTrackerServer,
if(result != 0) if(result != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -2408,7 +2408,7 @@ static int tracker_heart_beat(ConnectionInfo *pTrackerServer,
sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -2448,7 +2448,7 @@ static int tracker_storage_change_status(ConnectionInfo *pTrackerServer,
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"tracker server: %s:%d, try to set storage " "tracker server: %s:%u, try to set storage "
"status from %d (%s) to %d (%s)", __LINE__, "status from %d (%s) to %d (%s)", __LINE__,
pTrackerServer->ip_addr, pTrackerServer->port, pTrackerServer->ip_addr, pTrackerServer->port,
old_status, get_storage_status_caption(old_status), old_status, get_storage_status_caption(old_status),
@ -2465,7 +2465,7 @@ static int tracker_storage_change_status(ConnectionInfo *pTrackerServer,
sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader) + body_len, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, send data fail, " "tracker server %s:%u, send data fail, "
"errno: %d, error info: %s.", "errno: %d, error info: %s.",
__LINE__, pTrackerServer->ip_addr, __LINE__, pTrackerServer->ip_addr,
pTrackerServer->port, pTrackerServer->port,
@ -2487,7 +2487,7 @@ static int tracker_storage_change_status(ConnectionInfo *pTrackerServer,
if (nInPackLen != 0) if (nInPackLen != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, response body length: %d != 0", "tracker server %s:%u, response body length: %d != 0",
__LINE__, pTrackerServer->ip_addr, pTrackerServer->port, __LINE__, pTrackerServer->ip_addr, pTrackerServer->port,
(int)nInPackLen); (int)nInPackLen);
return EINVAL; return EINVAL;
@ -2512,7 +2512,7 @@ static int tracker_storage_changelog_req(ConnectionInfo *pTrackerServer)
sizeof(TrackerHeader), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, send data fail, " \ "tracker server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pTrackerServer->ip_addr, \ __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \

View File

@ -54,7 +54,7 @@ static int trunk_client_trunk_do_alloc_space(ConnectionInfo *pTrunkServer, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrunkServer->ip_addr, pTrunkServer->port, \ pTrunkServer->ip_addr, pTrunkServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -75,7 +75,7 @@ static int trunk_client_trunk_do_alloc_space(ConnectionInfo *pTrunkServer, \
if (in_bytes != sizeof(FDFSTrunkInfoBuff)) if (in_bytes != sizeof(FDFSTrunkInfoBuff))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d, recv body length: %d invalid, " \ "storage server %s:%u, recv body length: %d invalid, " \
"expect body length: %d", __LINE__, \ "expect body length: %d", __LINE__, \
pTrunkServer->ip_addr, pTrunkServer->port, \ pTrunkServer->ip_addr, pTrunkServer->port, \
(int)in_bytes, (int)sizeof(FDFSTrunkInfoBuff)); (int)in_bytes, (int)sizeof(FDFSTrunkInfoBuff));
@ -110,7 +110,7 @@ static int trunk_client_connect_trunk_server(TrackerServerInfo *trunk_server,
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"%s because connect to trunk " "%s because connect to trunk "
"server %s:%d fail, errno: %d", __LINE__, "server %s:%u fail, errno: %d", __LINE__,
prompt, trunk_server->connections[0].ip_addr, prompt, trunk_server->connections[0].ip_addr,
trunk_server->connections[0].port, result); trunk_server->connections[0].port, result);
return result; return result;
@ -189,7 +189,7 @@ static int trunk_client_trunk_confirm_or_free(ConnectionInfo *pTrunkServer,\
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrunkServer->ip_addr, pTrunkServer->port, \ pTrunkServer->ip_addr, pTrunkServer->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -208,7 +208,7 @@ static int trunk_client_trunk_confirm_or_free(ConnectionInfo *pTrunkServer,\
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d response data " \ "storage server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"should == 0", __LINE__, pTrunkServer->ip_addr, \ "should == 0", __LINE__, pTrunkServer->ip_addr, \
pTrunkServer->port, in_bytes); pTrunkServer->port, in_bytes);

View File

@ -1972,7 +1972,7 @@ static void trunk_sync_thread_exit(TrunkSyncThreadInfo *thread_data,
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"trunk sync thread to storage server %s:%d exit", "trunk sync thread to storage server %s:%u exit",
__LINE__, thread_data->pStorage->ip_addr, port); __LINE__, thread_data->pStorage->ip_addr, port);
} }
@ -2011,7 +2011,7 @@ static int trunk_sync_data(TrunkBinLogReader *pReader, \
sizeof(TrackerHeader), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(TrackerHeader), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " \ logError("FILE: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorage->ip_addr, pStorage->port, \ __LINE__, pStorage->ip_addr, pStorage->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -2022,7 +2022,7 @@ static int trunk_sync_data(TrunkBinLogReader *pReader, \
length, SF_G_NETWORK_TIMEOUT)) != 0) length, SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("FILE: "__FILE__", line: %d, " \ logError("FILE: "__FILE__", line: %d, " \
"send data to storage server %s:%d fail, " \ "send data to storage server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
__LINE__, pStorage->ip_addr, pStorage->port, \ __LINE__, pStorage->ip_addr, pStorage->port, \
result, STRERROR(result)); result, STRERROR(result));
@ -2076,7 +2076,7 @@ static void *trunk_sync_thread_entrance(void* arg)
storage_server.sock = -1; storage_server.sock = -1;
logInfo("file: "__FILE__", line: %d, " \ logInfo("file: "__FILE__", line: %d, " \
"trunk sync thread to storage server %s:%d started", \ "trunk sync thread to storage server %s:%u started",
__LINE__, storage_server.ip_addr, storage_server.port); __LINE__, storage_server.ip_addr, storage_server.port);
while (SF_G_CONTINUE_FLAG && g_if_trunker_self && \ while (SF_G_CONTINUE_FLAG && g_if_trunker_self && \

View File

@ -576,7 +576,7 @@ int fdfs_get_storage_ids_from_tracker_server(TrackerServerInfo *pTrackerServer)
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to tracker server %s:%d fail, " "send data to tracker server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
conn->ip_addr, conn->port, conn->ip_addr, conn->port,
result, STRERROR(result)); result, STRERROR(result));
@ -601,7 +601,7 @@ int fdfs_get_storage_ids_from_tracker_server(TrackerServerInfo *pTrackerServer)
if (in_bytes < 2 * sizeof(int)) if (in_bytes < 2 * sizeof(int))
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, recv data length: %d " "tracker server %s:%u, recv data length: %d "
"is invalid", __LINE__, conn->ip_addr, "is invalid", __LINE__, conn->ip_addr,
conn->port, (int)in_bytes); conn->port, (int)in_bytes);
result = EINVAL; result = EINVAL;
@ -613,7 +613,7 @@ int fdfs_get_storage_ids_from_tracker_server(TrackerServerInfo *pTrackerServer)
if (total_count <= start_index) if (total_count <= start_index)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, total storage " "tracker server %s:%u, total storage "
"count: %d is invalid, which <= start " "count: %d is invalid, which <= start "
"index: %d", __LINE__, conn->ip_addr, "index: %d", __LINE__, conn->ip_addr,
conn->port, total_count, start_index); conn->port, total_count, start_index);
@ -624,7 +624,7 @@ int fdfs_get_storage_ids_from_tracker_server(TrackerServerInfo *pTrackerServer)
if (current_count <= 0) if (current_count <= 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, current storage " "tracker server %s:%u, current storage "
"count: %d is invalid, which <= 0", __LINE__, "count: %d is invalid, which <= 0", __LINE__,
conn->ip_addr, conn->port, current_count); conn->ip_addr, conn->port, current_count);
result = EINVAL; result = EINVAL;
@ -651,7 +651,7 @@ int fdfs_get_storage_ids_from_tracker_server(TrackerServerInfo *pTrackerServer)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"response data from tracker " "response data from tracker "
"server %s:%d is too large", "server %s:%u is too large",
__LINE__, conn->ip_addr, conn->port); __LINE__, conn->ip_addr, conn->port);
result = ENOSPC; result = ENOSPC;
break; break;

View File

@ -499,7 +499,7 @@ int fdfs_server_info_to_string_ex(const TrackerServerInfo *pServer,
} }
if (pServer->count == 1) if (pServer->count == 1)
{ {
return snprintf(buff, buffSize, "%s:%d", return snprintf(buff, buffSize, "%s:%u",
pServer->connections[0].ip_addr, port); pServer->connections[0].ip_addr, port);
} }

View File

@ -444,7 +444,7 @@ static int fdfs_dump_tracker_servers(char *buff, const int buffSize)
fdfs_server_info_to_string(pTrackerServer, ip_str, sizeof(ip_str)); fdfs_server_info_to_string(pTrackerServer, ip_str, sizeof(ip_str));
total_len += snprintf(buff + total_len, buffSize - total_len, total_len += snprintf(buff + total_len, buffSize - total_len,
"\t%d. tracker server=%s:%d\n", \ "\t%d. tracker server=%s:%u\n", \
(int)(pTrackerServer - g_tracker_servers.servers) + 1, \ (int)(pTrackerServer - g_tracker_servers.servers) + 1, \
ip_str, pTrackerServer->connections[0].port); ip_str, pTrackerServer->connections[0].port);
} }

View File

@ -85,7 +85,7 @@ static void *http_check_entrance(void *arg)
{ {
logInfo("file: "__FILE__", line: %d, " \ logInfo("file: "__FILE__", line: %d, " \
"http check alive success " \ "http check alive success " \
"after %d times, server: %s:%d", "after %d times, server: %s:%u",
__LINE__, \ __LINE__, \
(*ppServer)->http_check_fail_count, (*ppServer)->http_check_fail_count,
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
@ -102,7 +102,7 @@ static void *http_check_entrance(void *arg)
logError("file: "__FILE__", line: %d, "\ logError("file: "__FILE__", line: %d, "\
"http check alive fail after " \ "http check alive fail after " \
"%d times, storage server: " \ "%d times, storage server: " \
"%s:%d, error info: %s", \ "%s:%u, error info: %s", \
__LINE__, \ __LINE__, \
(*ppServer)->http_check_fail_count, \ (*ppServer)->http_check_fail_count, \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
@ -112,7 +112,7 @@ static void *http_check_entrance(void *arg)
sprintf((*ppServer)->http_check_error_info, sprintf((*ppServer)->http_check_error_info,
"http check alive, connect to http " \ "http check alive, connect to http " \
"server %s:%d fail, " \ "server %s:%u fail, " \
"errno: %d, error info: %s", \ "errno: %d, error info: %s", \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
(*ppGroup)->storage_http_port, result, \ (*ppGroup)->storage_http_port, result, \
@ -132,7 +132,7 @@ static void *http_check_entrance(void *arg)
} }
else //http else //http
{ {
sprintf(url, "http://%s:%d%s", (*ppServer)->ip_addr, \ sprintf(url, "http://%s:%u%s", (*ppServer)->ip_addr, \
(*ppGroup)->storage_http_port, g_http_check_uri); (*ppGroup)->storage_http_port, g_http_check_uri);
result = get_url_content(url, SF_G_CONNECT_TIMEOUT, \ result = get_url_content(url, SF_G_CONNECT_TIMEOUT, \
@ -176,7 +176,7 @@ static void *http_check_entrance(void *arg)
logError("file: "__FILE__", line: %d, "\ logError("file: "__FILE__", line: %d, "\
"http check alive fail after " \ "http check alive fail after " \
"%d times, storage server: " \ "%d times, storage server: " \
"%s:%d, error info: %s", \ "%s:%u, error info: %s", \
__LINE__, \ __LINE__, \
(*ppServer)->http_check_fail_count, \ (*ppServer)->http_check_fail_count, \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
@ -211,7 +211,7 @@ static void *http_check_entrance(void *arg)
logError("file: "__FILE__", line: %d, "\ logError("file: "__FILE__", line: %d, "\
"http check alive fail after " \ "http check alive fail after " \
"%d times, storage server: " \ "%d times, storage server: " \
"%s:%d, error info: %s", \ "%s:%u, error info: %s", \
__LINE__, \ __LINE__, \
(*ppServer)->http_check_fail_count, \ (*ppServer)->http_check_fail_count, \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \
@ -264,7 +264,7 @@ static void *http_check_entrance(void *arg)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"http check alive fail " \ "http check alive fail " \
"after %d times, storage server: %s:%d, " \ "after %d times, storage server: %s:%u, " \
"error info: %s", \ "error info: %s", \
__LINE__, (*ppServer)->http_check_fail_count, \ __LINE__, (*ppServer)->http_check_fail_count, \
(*ppServer)->ip_addr, \ (*ppServer)->ip_addr, \

View File

@ -1830,7 +1830,7 @@ int tracker_save_storages()
count++; count++;
len = sprintf(buff, \ len = sprintf(buff, \
"# storage %s:%d\n" \ "# storage %s:%u\n" \
"[%s"STORAGE_SECTION_NO_FORMAT"]\n" \ "[%s"STORAGE_SECTION_NO_FORMAT"]\n" \
"%s" \ "%s" \
"\t%s=%s\n" \ "\t%s=%s\n" \
@ -3420,7 +3420,7 @@ int tracker_mem_delete_storage(FDFSGroupInfo *pGroup, const char *id)
} }
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"delete storage server: %s:%d, group: %s", "delete storage server: %s:%u, group: %s",
__LINE__, pStorageServer->ip_addrs.ips[0].address, __LINE__, pStorageServer->ip_addrs.ips[0].address,
pStorageServer->storage_port, pGroup->group_name); pStorageServer->storage_port, pGroup->group_name);
@ -3826,7 +3826,7 @@ static int tracker_mem_get_sys_file_piece(ConnectionInfo *pTrackerServer, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"send data to tracker server %s:%d fail, " \ "send data to tracker server %s:%u fail, " \
"errno: %d, error info: %s", __LINE__, \ "errno: %d, error info: %s", __LINE__, \
pTrackerServer->ip_addr, \ pTrackerServer->ip_addr, \
pTrackerServer->port, \ pTrackerServer->port, \
@ -3849,7 +3849,7 @@ static int tracker_mem_get_sys_file_piece(ConnectionInfo *pTrackerServer, \
if (in_bytes < FDFS_PROTO_PKG_LEN_SIZE) if (in_bytes < FDFS_PROTO_PKG_LEN_SIZE)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d response data " \ "tracker server %s:%u response data " \
"length: %"PRId64" is invalid, " \ "length: %"PRId64" is invalid, " \
"expect length >= %d.", __LINE__, \ "expect length >= %d.", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
@ -3863,7 +3863,7 @@ static int tracker_mem_get_sys_file_piece(ConnectionInfo *pTrackerServer, \
if (*file_size < 0) if (*file_size < 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, file size: %"PRId64\ "tracker server %s:%u, file size: %"PRId64\
" < 0", __LINE__, pTrackerServer->ip_addr, \ " < 0", __LINE__, pTrackerServer->ip_addr, \
pTrackerServer->port, *file_size); pTrackerServer->port, *file_size);
return EINVAL; return EINVAL;
@ -3872,7 +3872,7 @@ static int tracker_mem_get_sys_file_piece(ConnectionInfo *pTrackerServer, \
if (*file_size > 0 && write_bytes == 0) if (*file_size > 0 && write_bytes == 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"tracker server %s:%d, file size: %"PRId64\ "tracker server %s:%u, file size: %"PRId64\
" > 0, but file content is empty", __LINE__, \ " > 0, but file content is empty", __LINE__, \
pTrackerServer->ip_addr, pTrackerServer->port, \ pTrackerServer->ip_addr, pTrackerServer->port, \
*file_size); *file_size);
@ -4278,7 +4278,7 @@ static int tracker_mem_get_tracker_server(FDFSStorageJoinBody *pJoinBody, \
for (i=0; i<count; i++) for (i=0; i<count; i++)
{ {
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"%s:%d leader: %d, running time: %d, " "%s:%u leader: %d, running time: %d, "
"restart interval: %d", __LINE__, "restart interval: %d", __LINE__,
trackerStatus[i].pTrackerServer->connections[0].ip_addr, trackerStatus[i].pTrackerServer->connections[0].ip_addr,
trackerStatus[i].pTrackerServer->connections[0].port, trackerStatus[i].pTrackerServer->connections[0].port,
@ -4319,7 +4319,7 @@ static int tracker_mem_get_sys_files_from_others(FDFSStorageJoinBody *pJoinBody,
&trackerStatus) >= 0) &trackerStatus) >= 0)
{ {
logDebug("file: "__FILE__", line: %d, " logDebug("file: "__FILE__", line: %d, "
"%s:%d running time: %d, restart interval: %d, " "%s:%u running time: %d, restart interval: %d, "
"my running time: %d, restart interval: %d, " "my running time: %d, restart interval: %d, "
"do not need sync system files", __LINE__, "do not need sync system files", __LINE__,
trackerStatus.pTrackerServer->connections[0].ip_addr, trackerStatus.pTrackerServer->connections[0].ip_addr,
@ -4341,7 +4341,7 @@ static int tracker_mem_get_sys_files_from_others(FDFSStorageJoinBody *pJoinBody,
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"sys files loaded from tracker server %s:%d", "sys files loaded from tracker server %s:%u",
__LINE__, pTrackerServer->connections[0].ip_addr, __LINE__, pTrackerServer->connections[0].ip_addr,
pTrackerServer->connections[0].port); pTrackerServer->connections[0].port);
@ -4633,7 +4633,7 @@ int tracker_mem_add_group_and_storage(TrackerClientInfo *pClientInfo, \
pJoinBody->status == FDFS_STORAGE_STATUS_NONE) pJoinBody->status == FDFS_STORAGE_STATUS_NONE)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"client ip: %s:%d, invalid storage " \ "client ip: %s:%u, invalid storage " \
"status %d, in the group \"%s\"", \ "status %d, in the group \"%s\"", \
__LINE__, ip_addr, \ __LINE__, ip_addr, \
pJoinBody->storage_port, \ pJoinBody->storage_port, \
@ -4882,7 +4882,7 @@ int tracker_mem_sync_storages(FDFSGroupInfo *pGroup, \
} }
logWarning("file: "__FILE__", line: %d, " logWarning("file: "__FILE__", line: %d, "
"storage server: %s:%d, dest status: %d, " "storage server: %s:%u, dest status: %d, "
"my status: %d, should change my status!", "my status: %d, should change my status!",
__LINE__, FDFS_CURRENT_IP_ADDR(*ppFound), __LINE__, FDFS_CURRENT_IP_ADDR(*ppFound),
(*ppFound)->storage_port, (*ppFound)->storage_port,
@ -4992,7 +4992,7 @@ static int _storage_get_trunk_binlog_size(
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d, send data fail, " \ "storage server %s:%u, send data fail, " \
"errno: %d, error info: %s.", \ "errno: %d, error info: %s.", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, \ pStorageServer->port, \
@ -5013,7 +5013,7 @@ static int _storage_get_trunk_binlog_size(
if (in_bytes != sizeof(in_buff)) if (in_bytes != sizeof(in_buff))
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"storage server %s:%d, recv body length: " \ "storage server %s:%u, recv body length: " \
"%"PRId64" != %d", \ "%"PRId64" != %d", \
__LINE__, pStorageServer->ip_addr, \ __LINE__, pStorageServer->ip_addr, \
pStorageServer->port, in_bytes, (int)sizeof(in_buff)); pStorageServer->port, in_bytes, (int)sizeof(in_buff));
@ -5045,7 +5045,7 @@ static int tracker_mem_get_trunk_binlog_size(
logDebug("file: "__FILE__", line: %d, " \ logDebug("file: "__FILE__", line: %d, " \
"storage %s:%d, trunk binlog file size: %"PRId64, \ "storage %s:%u, trunk binlog file size: %"PRId64, \
__LINE__, storage_server.ip_addr, storage_server.port, \ __LINE__, storage_server.ip_addr, storage_server.port, \
*file_size); *file_size);
return result; return result;
@ -5205,7 +5205,7 @@ static int tracker_mem_do_set_trunk_server(FDFSGroupInfo *pGroup,
g_trunk_server_chg_count++; g_trunk_server_chg_count++;
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"group: %s, trunk server set to %s(%s:%d)", __LINE__, "group: %s, trunk server set to %s(%s:%u)", __LINE__,
pGroup->group_name, pGroup->pTrunkServer->id, pGroup->group_name, pGroup->pTrunkServer->id,
FDFS_CURRENT_IP_ADDR(pGroup->pTrunkServer), FDFS_CURRENT_IP_ADDR(pGroup->pTrunkServer),
pGroup->storage_port); pGroup->storage_port);
@ -6087,7 +6087,7 @@ int tracker_mem_check_alive(void *arg)
if (g_use_storage_id) if (g_use_storage_id)
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"storage server %s(%s:%d) idle too long, " "storage server %s(%s:%u) idle too long, "
"status change to offline!", __LINE__, "status change to offline!", __LINE__,
(*ppServer)->id, FDFS_CURRENT_IP_ADDR(*ppServer), (*ppServer)->id, FDFS_CURRENT_IP_ADDR(*ppServer),
(*ppGroup)->storage_port); (*ppGroup)->storage_port);
@ -6095,7 +6095,7 @@ int tracker_mem_check_alive(void *arg)
else else
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"storage server %s:%d idle too long, " "storage server %s:%u idle too long, "
"status change to offline!", __LINE__, "status change to offline!", __LINE__,
FDFS_CURRENT_IP_ADDR(*ppServer), FDFS_CURRENT_IP_ADDR(*ppServer),
(*ppGroup)->storage_port); (*ppGroup)->storage_port);
@ -6145,7 +6145,7 @@ int tracker_mem_check_alive(void *arg)
if (last_beat_interval > check_trunk_interval) if (last_beat_interval > check_trunk_interval)
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"trunk server %s(%s:%d) offline because idle " "trunk server %s(%s:%u) offline because idle "
"time: %d s > threshold: %d s, should " "time: %d s > threshold: %d s, should "
"re-select trunk server", __LINE__, "re-select trunk server", __LINE__,
(*ppGroup)->pTrunkServer->id, (*ppGroup)->pTrunkServer->id,

View File

@ -54,7 +54,7 @@ static int fdfs_ping_leader(ConnectionInfo *pTrackerServer)
if(result != 0) if(result != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, send data fail, " "tracker server %s:%u, send data fail, "
"errno: %d, error info: %s", "errno: %d, error info: %s",
__LINE__, pTrackerServer->ip_addr, __LINE__, pTrackerServer->ip_addr,
pTrackerServer->port, result, STRERROR(result)); pTrackerServer->port, result, STRERROR(result));
@ -66,7 +66,7 @@ static int fdfs_ping_leader(ConnectionInfo *pTrackerServer)
sizeof(in_buff), &in_bytes)) != 0) sizeof(in_buff), &in_bytes)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"fdfs_recv_response from %s:%d fail, result: %d", "fdfs_recv_response from %s:%u fail, result: %d",
__LINE__, pTrackerServer->ip_addr, __LINE__, pTrackerServer->ip_addr,
pTrackerServer->port, result); pTrackerServer->port, result);
return result; return result;
@ -80,7 +80,7 @@ static int fdfs_ping_leader(ConnectionInfo *pTrackerServer)
FDFS_STORAGE_ID_MAX_SIZE) != 0) FDFS_STORAGE_ID_MAX_SIZE) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d, invalid body length: " "tracker server %s:%u, invalid body length: "
"%"PRId64, __LINE__, pTrackerServer->ip_addr, "%"PRId64, __LINE__, pTrackerServer->ip_addr,
pTrackerServer->port, in_bytes); pTrackerServer->port, in_bytes);
return EINVAL; return EINVAL;
@ -238,7 +238,7 @@ static int relationship_get_tracker_leader(TrackerRunningStatus *pTrackerStatus)
for (i=0; i<count; i++) for (i=0; i<count; i++)
{ {
logDebug("file: "__FILE__", line: %d, " \ logDebug("file: "__FILE__", line: %d, " \
"%s:%d if_leader: %d, running time: %d, " \ "%s:%u if_leader: %d, running time: %d, " \
"restart interval: %d", __LINE__, \ "restart interval: %d", __LINE__, \
trackerStatus[i].pTrackerServer->connections->ip_addr, \ trackerStatus[i].pTrackerServer->connections->ip_addr, \
trackerStatus[i].pTrackerServer->connections->port, \ trackerStatus[i].pTrackerServer->connections->port, \
@ -276,14 +276,14 @@ static int do_notify_leader_changed(TrackerServerInfo *pTrackerServer, \
memset(out_buff, 0, sizeof(out_buff)); memset(out_buff, 0, sizeof(out_buff));
pHeader = (TrackerHeader *)out_buff; pHeader = (TrackerHeader *)out_buff;
pHeader->cmd = cmd; pHeader->cmd = cmd;
sprintf(out_buff + sizeof(TrackerHeader), "%s:%d", \ sprintf(out_buff + sizeof(TrackerHeader), "%s:%u", \
pLeader->ip_addr, pLeader->port); pLeader->ip_addr, pLeader->port);
long2buff(FDFS_PROTO_IP_PORT_SIZE, pHeader->pkg_len); long2buff(FDFS_PROTO_IP_PORT_SIZE, pHeader->pkg_len);
if ((result=tcpsenddata_nb(conn->sock, out_buff, \ if ((result=tcpsenddata_nb(conn->sock, out_buff, \
sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0) sizeof(out_buff), SF_G_NETWORK_TIMEOUT)) != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"send data to tracker server %s:%d fail, " "send data to tracker server %s:%u fail, "
"errno: %d, error info: %s", __LINE__, "errno: %d, error info: %s", __LINE__,
conn->ip_addr, conn->port, result, STRERROR(result)); conn->ip_addr, conn->port, result, STRERROR(result));
@ -297,7 +297,7 @@ static int do_notify_leader_changed(TrackerServerInfo *pTrackerServer, \
if (result != 0) if (result != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"fdfs_recv_response from tracker server %s:%d fail, " "fdfs_recv_response from tracker server %s:%u fail, "
"result: %d", __LINE__, conn->ip_addr, conn->port, result); "result: %d", __LINE__, conn->ip_addr, conn->port, result);
break; break;
} }
@ -305,7 +305,7 @@ static int do_notify_leader_changed(TrackerServerInfo *pTrackerServer, \
if (in_bytes != 0) if (in_bytes != 0)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"tracker server %s:%d response data " "tracker server %s:%u response data "
"length: %"PRId64" is invalid, " "length: %"PRId64" is invalid, "
"expect length: %d.", __LINE__, "expect length: %d.", __LINE__,
conn->ip_addr, conn->port, in_bytes, 0); conn->ip_addr, conn->port, in_bytes, 0);
@ -341,7 +341,7 @@ void relationship_set_tracker_leader(const int server_index,
else else
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"the tracker leader is %s:%d", __LINE__, "the tracker leader is %s:%u", __LINE__,
pLeader->ip_addr, pLeader->port); pLeader->ip_addr, pLeader->port);
} }
} }
@ -483,7 +483,7 @@ static int relationship_select_leader()
} }
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"I am the new tracker leader %s:%d", "I am the new tracker leader %s:%u",
__LINE__, conn->ip_addr, conn->port); __LINE__, conn->ip_addr, conn->port);
tracker_mem_find_trunk_servers(); tracker_mem_find_trunk_servers();
@ -510,13 +510,13 @@ static int relationship_select_leader()
if (g_tracker_servers.leader_index >= 0) if (g_tracker_servers.leader_index >= 0)
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"the tracker leader %s:%d", __LINE__, "the tracker leader %s:%u", __LINE__,
conn->ip_addr, conn->port); conn->ip_addr, conn->port);
} }
else else
{ {
logInfo("file: "__FILE__", line: %d, " logInfo("file: "__FILE__", line: %d, "
"waiting for the candidate tracker leader %s:%d notify ...", "waiting for the candidate tracker leader %s:%u notify ...",
__LINE__, conn->ip_addr, conn->port); __LINE__, conn->ip_addr, conn->port);
return ENOENT; return ENOENT;
} }
@ -601,7 +601,7 @@ static void *relationship_thread_entrance(void* arg)
{ {
pLeader = g_tracker_servers.servers pLeader = g_tracker_servers.servers
[leader_index].connections; [leader_index].connections;
sprintf(leader_str, "leader %s:%d", sprintf(leader_str, "leader %s:%u",
pLeader->ip_addr, pLeader->port); pLeader->ip_addr, pLeader->port);
} }

View File

@ -675,7 +675,7 @@ static int tracker_deal_notify_next_leader(struct fast_task_info *pTask)
if (server_index < 0) if (server_index < 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"client ip: %s, leader %s:%d not exist", \ "client ip: %s, leader %s:%u not exist", \
__LINE__, pTask->client_ip, \ __LINE__, pTask->client_ip, \
leader.ip_addr, leader.port); leader.ip_addr, leader.port);
return ENOENT; return ENOENT;
@ -690,7 +690,7 @@ static int tracker_deal_notify_next_leader(struct fast_task_info *pTask)
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"client ip: %s, two leaders occur, " \ "client ip: %s, two leaders occur, " \
"new leader is %s:%d", \ "new leader is %s:%u", \
__LINE__, pTask->client_ip, \ __LINE__, pTask->client_ip, \
leader.ip_addr, leader.port); leader.ip_addr, leader.port);
return EINVAL; return EINVAL;
@ -740,7 +740,7 @@ static int tracker_deal_commit_next_leader(struct fast_task_info *pTask)
if (server_index < 0) if (server_index < 0)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"client ip: %s, leader %s:%d not exist", \ "client ip: %s, leader %s:%u not exist", \
__LINE__, pTask->client_ip, \ __LINE__, pTask->client_ip, \
leader.ip_addr, leader.port); leader.ip_addr, leader.port);
return ENOENT; return ENOENT;
@ -748,7 +748,7 @@ static int tracker_deal_commit_next_leader(struct fast_task_info *pTask)
if (server_index != g_next_leader_index) if (server_index != g_next_leader_index)
{ {
logError("file: "__FILE__", line: %d, " \ logError("file: "__FILE__", line: %d, " \
"client ip: %s, can't commit leader %s:%d", \ "client ip: %s, can't commit leader %s:%u", \
__LINE__, pTask->client_ip, \ __LINE__, pTask->client_ip, \
leader.ip_addr, leader.port); leader.ip_addr, leader.port);
return EINVAL; return EINVAL;
@ -1025,7 +1025,7 @@ static int tracker_deal_get_storage_group_name(struct fast_task_info *pTask)
if (pFDFSStorageIdInfo == NULL) if (pFDFSStorageIdInfo == NULL)
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"client ip: %s, can't get group name for storage %s:%d", "client ip: %s, can't get group name for storage %s:%u",
__LINE__, pTask->client_ip, ip_addr, port); __LINE__, pTask->client_ip, ip_addr, port);
pTask->length = sizeof(TrackerHeader); pTask->length = sizeof(TrackerHeader);
return ENOENT; return ENOENT;
@ -3501,7 +3501,7 @@ static int tracker_deal_storage_df_report(struct fast_task_info *pTask)
tracker_find_max_free_space_group(); tracker_find_max_free_space_group();
/* /*
//logInfo("storage: %s:%d, total_mb=%dMB, free_mb=%dMB\n", \ //logInfo("storage: %s:%u, total_mb=%dMB, free_mb=%dMB\n", \
pClientInfo->pStorage->ip_addr, \ pClientInfo->pStorage->ip_addr, \
pClientInfo->pGroup->storage_port, \ pClientInfo->pGroup->storage_port, \
pClientInfo->pStorage->total_mb, \ pClientInfo->pStorage->total_mb, \