From d37c41011a99d91ffdc1aed478c0453b8a30fd4b Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Thu, 14 Jun 2012 13:52:53 +0200 Subject: [PATCH] if the remote sync site says BAD_OTP log and remove from queue --- ykval-synclib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ykval-synclib.php b/ykval-synclib.php index 2627b20..f990c42 100644 --- a/ykval-synclib.php +++ b/ykval-synclib.php @@ -377,6 +377,12 @@ class SyncLib array("modified"=>$entry['modified'], "server_nonce"=>$entry['server_nonce'], 'server'=>$entry['server'])); + } else if (preg_match("/status=BAD_OTP/", $response)) { + $this->log(LOG_WARNING, "Remote server says BAD_OTP, pointless to try again, removing from queue."); + $this->db->deleteByMultiple('queue', + array("modified"=>$entry['modified'], + "server_nonce"=>$entry['server_nonce'], + 'server'=>$entry['server'])); } else { $this->log(LOG_ERR, "Remote server refused our sync request. Check remote server logs."); }