parent
10aa9a8de8
commit
75c5535f5a
|
|
@ -923,7 +923,7 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
|
||||||
char formatted_ip[FORMATTED_IP_SIZE];
|
char formatted_ip[FORMATTED_IP_SIZE];
|
||||||
char *pInBuff;
|
char *pInBuff;
|
||||||
ConnectionInfo storageServer;
|
ConnectionInfo storageServer;
|
||||||
bool new_connection;
|
bool new_connection = false;
|
||||||
bool bUploadSlave;
|
bool bUploadSlave;
|
||||||
int new_store_path;
|
int new_store_path;
|
||||||
int master_filename_len;
|
int master_filename_len;
|
||||||
|
|
@ -952,20 +952,23 @@ int storage_do_upload_file(ConnectionInfo *pTrackerServer, \
|
||||||
bUploadSlave = (strlen(group_name) > 0 && master_filename_len > 0);
|
bUploadSlave = (strlen(group_name) > 0 && master_filename_len > 0);
|
||||||
if (bUploadSlave)
|
if (bUploadSlave)
|
||||||
{
|
{
|
||||||
if ((result=storage_get_update_connection(pTrackerServer, \
|
if ((result=storage_get_update_connection(pTrackerServer,
|
||||||
&pStorageServer, group_name, master_filename, \
|
&pStorageServer, group_name, master_filename,
|
||||||
&storageServer, &new_connection)) != 0)
|
&storageServer, &new_connection)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((result=storage_get_upload_connection(pTrackerServer, \
|
else
|
||||||
&pStorageServer, group_name, &storageServer, \
|
{
|
||||||
&new_store_path, &new_connection)) != 0)
|
if ((result=storage_get_upload_connection(pTrackerServer,
|
||||||
{
|
&pStorageServer, group_name, &storageServer,
|
||||||
*group_name = '\0';
|
&new_store_path, &new_connection)) != 0)
|
||||||
return result;
|
{
|
||||||
}
|
*group_name = '\0';
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*group_name = '\0';
|
*group_name = '\0';
|
||||||
|
|
||||||
|
|
@ -1269,8 +1272,8 @@ int storage_set_metadata(ConnectionInfo *pTrackerServer, \
|
||||||
char *pEnd;
|
char *pEnd;
|
||||||
bool new_connection;
|
bool new_connection;
|
||||||
|
|
||||||
if ((result=storage_get_update_connection(pTrackerServer, \
|
if ((result=storage_get_update_connection(pTrackerServer,
|
||||||
&pStorageServer, group_name, filename, \
|
&pStorageServer, group_name, filename,
|
||||||
&storageServer, &new_connection)) != 0)
|
&storageServer, &new_connection)) != 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
|
|
@ -1783,7 +1783,7 @@ void storage_get_store_path(const char *filename, const int filename_len, \
|
||||||
{ \
|
{ \
|
||||||
int r; \
|
int r; \
|
||||||
r = (rand() & 0x007FFFFF) | 0x80000000; \
|
r = (rand() & 0x007FFFFF) | 0x80000000; \
|
||||||
masked_file_size = (((int64_t)r) << 32 ) | file_size; \
|
masked_file_size = (((int64_t)r) << 32 ) | (file_size); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue