From: APTX Date: Sun, 26 May 2013 21:35:17 +0000 (+0200) Subject: Set connection_error_count and data_error_count only in one place. X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=0a9670f56bd1de2c3d5361cb2eb34faff93ac4a2;p=localmylist.git Set connection_error_count and data_error_count only in one place. --- diff --git a/localmylist/database.cpp b/localmylist/database.cpp index 9106f76..60e3c57 100644 --- a/localmylist/database.cpp +++ b/localmylist/database.cpp @@ -1331,7 +1331,7 @@ bool Database::pendingRequestDataError(const PendingRequest &request) { QSqlQuery &q = prepare( "UPDATE pending_request " - " SET connection_error_count = 0, data_error_count = data_error_count + 1, failed = now() " + " SET failed = now() " " WHERE aid = :aid " " AND eid = :eid " " AND fid = :fid " @@ -1393,6 +1393,7 @@ bool Database::clearPendingRequestConnectionErrors(int minutes) bool Database::clearPendingRequestDataErrors() { // TODO make this configurable? + // These are in hours const int steps[] = {1, 2, 4, 8, 24, 48, 48, 48, 48}; QSqlQuery &q = prepare(