From 13156742c6db2f2561b47c0540b3075248d1792c Mon Sep 17 00:00:00 2001 From: APTX Date: Tue, 4 Jun 2013 20:32:15 +0200 Subject: [PATCH] Fix how requests failed with data errors interacts with failing requests from old clients. Failing requests from old clients ignores failed requests. Failing a request with a data error sets the client_id to 0. --- localmylist/database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/localmylist/database.cpp b/localmylist/database.cpp index b06aaae..c98070f 100644 --- a/localmylist/database.cpp +++ b/localmylist/database.cpp @@ -1321,6 +1321,7 @@ bool Database::failPendingRequestsFromOldClients() " SET start = NULL, client_id = 0, " " connection_error_count = connection_error_count + 1 " " WHERE start IS NOT NULL " + " AND failed IS NOT NULL " " AND client_id < :clientId "); q.bindValue(":clientId", clientId); @@ -1331,7 +1332,7 @@ bool Database::pendingRequestDataError(const PendingRequest &request) { QSqlQuery &q = prepare( "UPDATE pending_request " - " SET failed = now() " + " SET failed = now(), client_id = 0 " " WHERE aid = :aid " " AND eid = :eid " " AND fid = :fid " -- 2.52.0