gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3621 - in branches/GNUnet-0.7.0: . src/applications/datast


From: grothoff
Subject: [GNUnet-SVN] r3621 - in branches/GNUnet-0.7.0: . src/applications/datastore
Date: Fri, 3 Nov 2006 05:59:08 -0800 (PST)

Author: grothoff
Date: 2006-11-03 05:59:06 -0800 (Fri, 03 Nov 2006)
New Revision: 3621

Modified:
   branches/GNUnet-0.7.0/ChangeLog
   branches/GNUnet-0.7.0/src/applications/datastore/datastore.c
Log:
backporting sqlite and quota bugfix

Modified: branches/GNUnet-0.7.0/ChangeLog
===================================================================
--- branches/GNUnet-0.7.0/ChangeLog     2006-11-03 13:57:16 UTC (rev 3620)
+++ branches/GNUnet-0.7.0/ChangeLog     2006-11-03 13:59:06 UTC (rev 3621)
@@ -1,5 +1,6 @@
 Fri Nov  3 07:31:12 MST 2006
        Backported sqLite iterator and index creation bugfixes.
+       Backported quota violation (signed/unsigned) bugfix.
        
 Sat May 20 08:37:02 PDT 2006
        Releasing GNUnet 0.7.0e.

Modified: branches/GNUnet-0.7.0/src/applications/datastore/datastore.c
===================================================================
--- branches/GNUnet-0.7.0/src/applications/datastore/datastore.c        
2006-11-03 13:57:16 UTC (rev 3620)
+++ branches/GNUnet-0.7.0/src/applications/datastore/datastore.c        
2006-11-03 13:59:06 UTC (rev 3621)
@@ -281,7 +281,8 @@
   ret = sq->del(key, value);
   if (ret != SYSERR)
     available += ret * ntohl(value->size);
-  if (available >= MIN_FREE)
+  if ( (available > 0) &&
+       (available >= MIN_FREE) )
     return SYSERR;
   return OK;
 }
@@ -295,7 +296,8 @@
   ret = sq->del(key, value);
   if (ret != SYSERR)
     available += ret * ntohl(value->size);
-  if (available >= MIN_FREE)
+  if ( (available > 0) && 
+       (available >= MIN_FREE) )
     return SYSERR;
   return OK;
 }
@@ -308,11 +310,13 @@
  */
 static void cronMaintenance(void * unused) {
   available = quota - sq->getSize();
-  if (available < MIN_FREE) {
+  if ( (available < MIN_FREE) ||
+       (available < 0) ) {
     sq->iterateExpirationTime(ANY_BLOCK,
                              &freeSpaceExpired,
                              NULL);
-    if (available < MIN_FREE) {
+    if ( (available < MIN_FREE) ||
+        (available < 0) ) {
       sq->iterateLowPriority(ANY_BLOCK,
                             &freeSpaceLow,
                             NULL);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]