From: APTX Date: Tue, 4 Jun 2013 18:32:15 +0000 (+0200) Subject: Fix how requests failed with data errors interacts with failing requests from old... X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=13156742c6db2f2561b47c0540b3075248d1792c;p=localmylist.git 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. --- 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 "