diff --git a/server/src/FileServerHandler.cpp b/server/src/FileServerHandler.cpp index ad1d21b..4fb641d 100644 --- a/server/src/FileServerHandler.cpp +++ b/server/src/FileServerHandler.cpp @@ -46,21 +46,21 @@ void FileServerHandler::callback_transfer_registered(const std::shared_ptrexpected_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; } } }