From b3ae85d7cee58a9dcd6925432ba5a4a59cc231f7 Mon Sep 17 00:00:00 2001 From: Lars Andre Date: Thu, 23 Mar 2017 03:41:25 +0100 Subject: [PATCH] Fixed error when uploading existing log. --- src/movescount/movescount.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/movescount/movescount.cpp b/src/movescount/movescount.cpp index 9b245373..0b8e447b 100644 --- a/src/movescount/movescount.cpp +++ b/src/movescount/movescount.cpp @@ -340,14 +340,14 @@ void MovesCount::writeLogInThread(LogEntry *logEntry) reply = syncPOST("/moves/", "", output, true); - if (reply->error() == QNetworkReply::NoError) { + if (reply->error() == QNetworkReply::NoError || reply->error() == QNetworkReply::UnknownContentError) { QByteArray data = reply->readAll(); if (jsonParser.parseLogReply(data, moveId) == 0) { emit logMoveID(logEntry->device, logEntry->time, moveId); } - } + } else { - qDebug() << "Failed to upload log, movescount.com replied with \"" << reply->readAll() << "\""; + qDebug() << "Failed to upload log (err code:" << reply->error() << "), movescount.com replied with \"" << reply->readAll() << "\""; } }