diff --git a/storage/storage_func.c b/storage/storage_func.c index b5e9690..7d7cb12 100644 --- a/storage/storage_func.c +++ b/storage/storage_func.c @@ -1097,7 +1097,7 @@ static int storage_check_tracker_ipaddr(const char *filename) return 0; } -static int init_my_status_per_tracker() +static int init_my_result_per_tracker() { int bytes; TrackerServerInfo *pTrackerServer; @@ -1121,8 +1121,8 @@ static int init_my_status_per_tracker() for (pTrackerServer=g_tracker_group.servers; pTrackerServermy_status = -1; - pReportStatus->src_storage_status = -1; + pReportStatus->my_result = -1; + pReportStatus->src_storage_result = -1; pReportStatus++; } @@ -1947,7 +1947,7 @@ int storage_func_init(const char *filename, \ return result; } - if ((result=init_my_status_per_tracker()) != 0) + if ((result=init_my_result_per_tracker()) != 0) { return result; } diff --git a/storage/storage_global.h b/storage/storage_global.h index f03114e..a2f24b0 100644 --- a/storage/storage_global.h +++ b/storage/storage_global.h @@ -59,8 +59,8 @@ typedef struct typedef struct { - signed char my_status; - signed char src_storage_status; + signed char my_result; + signed char src_storage_result; bool get_my_ip_done; } StorageStatusPerTracker; diff --git a/storage/tracker_client_thread.c b/storage/tracker_client_thread.c index a394110..f2a1e3b 100644 --- a/storage/tracker_client_thread.c +++ b/storage/tracker_client_thread.c @@ -390,14 +390,14 @@ static void *tracker_report_thread_entrance(void *arg) sync_old_done = true; } - g_my_report_status[tracker_index].src_storage_status = + g_my_report_status[tracker_index].src_storage_result = tracker_sync_notify(conn, tracker_index); - if (g_my_report_status[tracker_index].src_storage_status != 0) + if (g_my_report_status[tracker_index].src_storage_result != 0) { int k; for (k=0; kip_addr)) + { + } + + ppFound = (FDFSStorageServer **)bsearch(&pTargetServer, + g_sorted_storages, g_storage_count, sizeof(FDFSStorageServer *), storage_cmp_by_server_id); if (ppFound != NULL) { @@ -1936,14 +1939,14 @@ int tracker_report_join(ConnectionInfo *pTrackerServer, \ { for (i=0; iip_addr, \ pTrackerServer->port, \ (int)sizeof(respBody), in_bytes); - g_my_report_status[tracker_index].my_status = EINVAL; + g_my_report_status[tracker_index].my_result = EINVAL; return EINVAL; }