Fixed 32 bit related error

This commit is contained in:
WolverinDEV 2021-02-05 15:14:46 +01:00
parent 37b3101561
commit a608b52269

View File

@ -46,21 +46,21 @@ void FileServerHandler::callback_transfer_registered(const std::shared_ptr<trans
const auto bytes = transfer->expected_file_size - transfer->file_offset;
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_UPLOADED] += bytes;
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_UPLOADED] += bytes;
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_UPLOADED] += (int64_t) bytes;
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_UPLOADED] += (int64_t) bytes;
} else {
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED] += bytes;
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_DOWNLOADED] += bytes;
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED] += (int64_t) bytes;
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_DOWNLOADED] += (int64_t) bytes;
}
auto client = server->find_client_by_id(transfer->client_id);
if(client && client->getUid() == transfer->client_unique_id) {
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
client->properties()[property::CLIENT_TOTAL_BYTES_UPLOADED] += bytes;
client->properties()[property::CLIENT_MONTH_BYTES_UPLOADED] += bytes;
client->properties()[property::CLIENT_TOTAL_BYTES_UPLOADED] += (int64_t) bytes;
client->properties()[property::CLIENT_MONTH_BYTES_UPLOADED] += (int64_t) bytes;
} else {
client->properties()[property::CLIENT_MONTH_BYTES_DOWNLOADED] += bytes;
client->properties()[property::CLIENT_MONTH_BYTES_DOWNLOADED] += bytes;
client->properties()[property::CLIENT_MONTH_BYTES_DOWNLOADED] += (int64_t) bytes;
client->properties()[property::CLIENT_MONTH_BYTES_DOWNLOADED] += (int64_t) bytes;
}
}
}