From fb951c5d1c4a274739c0a002286937baa817232e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 17 Nov 2010 15:28:35 +0100 Subject: [PATCH] Do not insert locked Sones. --- src/main/java/net/pterodactylus/sone/core/SoneInserter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java index e23d1a9..b79e620 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java @@ -160,6 +160,14 @@ public class SoneInserter extends AbstractService { /* check every seconds. */ sleep(1000); + /* don’t insert locked Sones. */ + if (core.isLocked(sone)) { + /* trigger redetection when the Sone is unlocked. */ + lastFingerprint = ""; + lastModificationTime = 0; + continue; + } + InsertInformation insertInformation = null; synchronized (sone) { String fingerprint = sone.getFingerprint(); -- 2.7.4