Fixed 32 bit related error
This commit is contained in:
parent
37b3101561
commit
a608b52269
@ -46,21 +46,21 @@ void FileServerHandler::callback_transfer_registered(const std::shared_ptr<trans
|
|||||||
|
|
||||||
const auto bytes = transfer->expected_file_size - transfer->file_offset;
|
const auto bytes = transfer->expected_file_size - transfer->file_offset;
|
||||||
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
|
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
|
||||||
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_UPLOADED] += bytes;
|
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_UPLOADED] += (int64_t) bytes;
|
||||||
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_UPLOADED] += bytes;
|
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_UPLOADED] += (int64_t) bytes;
|
||||||
} else {
|
} else {
|
||||||
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED] += bytes;
|
server->properties()[property::VIRTUALSERVER_TOTAL_BYTES_DOWNLOADED] += (int64_t) bytes;
|
||||||
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_DOWNLOADED] += bytes;
|
server->properties()[property::VIRTUALSERVER_MONTH_BYTES_DOWNLOADED] += (int64_t) bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto client = server->find_client_by_id(transfer->client_id);
|
auto client = server->find_client_by_id(transfer->client_id);
|
||||||
if(client && client->getUid() == transfer->client_unique_id) {
|
if(client && client->getUid() == transfer->client_unique_id) {
|
||||||
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
|
if(transfer->direction == transfer::Transfer::DIRECTION_UPLOAD) {
|
||||||
client->properties()[property::CLIENT_TOTAL_BYTES_UPLOADED] += bytes;
|
client->properties()[property::CLIENT_TOTAL_BYTES_UPLOADED] += (int64_t) bytes;
|
||||||
client->properties()[property::CLIENT_MONTH_BYTES_UPLOADED] += bytes;
|
client->properties()[property::CLIENT_MONTH_BYTES_UPLOADED] += (int64_t) bytes;
|
||||||
} else {
|
} else {
|
||||||
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] += bytes;
|
client->properties()[property::CLIENT_MONTH_BYTES_DOWNLOADED] += (int64_t) bytes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user