From 2daf2bf9d6b45bfded68143beb5d6b00b165b83c Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Wed, 10 Apr 2013 00:03:38 +0100
Subject: [PATCH] Documented the return value of incrementConnectionCounter().

---
 briar-api/src/net/sf/briar/api/db/DatabaseComponent.java | 3 ++-
 briar-core/src/net/sf/briar/db/Database.java             | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/briar-api/src/net/sf/briar/api/db/DatabaseComponent.java b/briar-api/src/net/sf/briar/api/db/DatabaseComponent.java
index 1ce45bc8de..4f26123167 100644
--- a/briar-api/src/net/sf/briar/api/db/DatabaseComponent.java
+++ b/briar-api/src/net/sf/briar/api/db/DatabaseComponent.java
@@ -244,7 +244,8 @@ public interface DatabaseComponent {
 
 	/**
 	 * Increments the outgoing connection counter for the given endpoint
-	 * in the given rotation period and returns the old value of the counter.
+	 * in the given rotation period and returns the old value, or -1 if the
+	 * counter does not exist.
 	 */
 	long incrementConnectionCounter(ContactId c, TransportId t, long period)
 			throws DbException;
diff --git a/briar-core/src/net/sf/briar/db/Database.java b/briar-core/src/net/sf/briar/db/Database.java
index 5aa63ee7e5..9fdeae416b 100644
--- a/briar-core/src/net/sf/briar/db/Database.java
+++ b/briar-core/src/net/sf/briar/db/Database.java
@@ -577,8 +577,9 @@ interface Database<T> {
 	boolean hasSendableMessages(T txn, ContactId c) throws DbException;
 
 	/**
-	 * Increments the outgoing connection counter for the given contact
-	 * transport in the given rotation period and returns the old value;
+	 * Increments the outgoing connection counter for the given endpoint
+	 * in the given rotation period and returns the old value, or -1 if the
+	 * counter does not exist.
 	 * <p>
 	 * Locking: window write.
 	 */
-- 
GitLab