Some updates
This commit is contained in:
@@ -569,6 +569,11 @@ command_result ConnectedClient::handleCommandFTInitUpload(ts::Command &cmd) {
|
||||
std::shared_ptr<file::ExecuteResponse<file::transfer::TransferInitError, std::shared_ptr<file::transfer::Transfer>>> transfer_response{};
|
||||
|
||||
info.max_bandwidth = -1;
|
||||
{
|
||||
auto max_quota = this->calculate_permission(permission::i_ft_max_bandwidth_upload, this->getClientId());
|
||||
if(max_quota.has_value)
|
||||
info.max_bandwidth = max_quota.value;
|
||||
}
|
||||
info.file_offset = 0;
|
||||
info.expected_file_size = cmd["size"].as<size_t>();
|
||||
info.override_exiting = cmd["overwrite"].as<bool>();
|
||||
@@ -721,6 +726,12 @@ command_result ConnectedClient::handleCommandFTInitDownload(ts::Command &cmd) {
|
||||
}
|
||||
|
||||
info.max_bandwidth = -1;
|
||||
{
|
||||
auto max_quota = this->calculate_permission(permission::i_ft_max_bandwidth_download, this->getClientId());
|
||||
if(max_quota.has_value)
|
||||
info.max_bandwidth = max_quota.value;
|
||||
}
|
||||
|
||||
info.file_offset = cmd["seekpos"].as<size_t>();
|
||||
info.override_exiting = false;
|
||||
info.file_path = cmd["name"].string();
|
||||
|
||||
Reference in New Issue
Block a user