Showing the changes to assignment-client/src/assets/SendAssetTask.cpp (1 of 6 files). Show all
Unified · Split
| @@ -55,7 +55,7 @@ void SendAssetTask::run() { · 54 unmodified lines | ||
| 55 | 55 | replyPacketList->writePrimitive(messageID); |
| 56 | 56 | |
| 57 | 57 | if (end <= start) { |
| 58 | − writeError(replyPacketList.get(), AssetServerError::INVALID_BYTE_RANGE); | |
| 58 | + writeError(replyPacketList.get(), AssetServerError::InvalidByteRange); | |
| 59 | 59 | } else { |
| 60 | 60 | QString filePath = _resourcesDir.filePath(QString(hexHash) + "." + QString(extension)); |
| 61 | 61 | |
| @@ -63,12 +63,12 @@ void SendAssetTask::run() { · 1 unmodified line | ||
| 63 | 63 | |
| 64 | 64 | if (file.open(QIODevice::ReadOnly)) { |
| 65 | 65 | if (file.size() < end) { |
| 66 | − writeError(replyPacketList.get(), AssetServerError::INVALID_BYTE_RANGE); | |
| 66 | + writeError(replyPacketList.get(), AssetServerError::InvalidByteRange); | |
| 67 | 67 | qCDebug(networking) << "Bad byte range: " << hexHash << " " << start << ":" << end; |
| 68 | 68 | } else { |
| 69 | 69 | auto size = end - start; |
| 70 | 70 | file.seek(start); |
| 71 | − replyPacketList->writePrimitive(AssetServerError::NO_ERROR); | |
| 71 | + replyPacketList->writePrimitive(AssetServerError::NoError); | |
| 72 | 72 | replyPacketList->writePrimitive(size); |
| 73 | 73 | replyPacketList->write(file.read(size)); |
| 74 | 74 | qCDebug(networking) << "Sending asset: " << hexHash; |
| @@ -76,7 +76,7 @@ void SendAssetTask::run() { · 1 unmodified line | ||
| 76 | 76 | file.close(); |
| 77 | 77 | } else { |
| 78 | 78 | qCDebug(networking) << "Asset not found: " << filePath << "(" << hexHash << ")"; |
| 79 | − writeError(replyPacketList.get(), AssetServerError::ASSET_NOT_FOUND); | |
| 79 | + writeError(replyPacketList.get(), AssetServerError::AssetNotFound); | |
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |