Merge pull request #667 from sunqiangwei1988/master

Fixed: 修复storage_report_my_server_id中长度变量引用错误的问题
pull/662/merge
YuQing 2023-10-11 18:21:51 +08:00 committed by GitHub
commit 4b42ed9fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -709,7 +709,7 @@ static int storage_report_my_server_id(ConnectionInfo *pStorageServer)
pHeader = (TrackerHeader *)out_buff; pHeader = (TrackerHeader *)out_buff;
memset(out_buff, 0, sizeof(out_buff)); memset(out_buff, 0, sizeof(out_buff));
long2buff(IP_ADDRESS_SIZE, pHeader->pkg_len); long2buff(FDFS_STORAGE_ID_MAX_SIZE, pHeader->pkg_len);
pHeader->cmd = STORAGE_PROTO_CMD_REPORT_SERVER_ID; pHeader->cmd = STORAGE_PROTO_CMD_REPORT_SERVER_ID;
strcpy(out_buff + sizeof(TrackerHeader), g_my_server_id_str); strcpy(out_buff + sizeof(TrackerHeader), g_my_server_id_str);
if ((result=tcpsenddata_nb(pStorageServer->sock, out_buff, \ if ((result=tcpsenddata_nb(pStorageServer->sock, out_buff, \