From: David ‘Bombe’ Roden Date: Wed, 17 Nov 2010 14:28:35 +0000 (+0100) Subject: Do not insert locked Sones. X-Git-Tag: 0.3-RC1~26 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fb951c5d1c4a274739c0a002286937baa817232e;p=Sone.git Do not insert locked Sones. --- 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();