[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2337 - GNUnet/src/applications/datastore
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2337 - GNUnet/src/applications/datastore |
Date: |
Fri, 16 Dec 2005 19:54:53 -0800 (PST) |
Author: grothoff
Date: 2005-12-16 19:54:49 -0800 (Fri, 16 Dec 2005)
New Revision: 2337
Modified:
GNUnet/src/applications/datastore/datastore.c
GNUnet/src/applications/datastore/filter.c
GNUnet/src/applications/datastore/filter.h
Log:
fail if bf fails
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2005-12-16 10:12:29 UTC
(rev 2336)
+++ GNUnet/src/applications/datastore/datastore.c 2005-12-17 03:54:49 UTC
(rev 2337)
@@ -328,7 +328,10 @@
coreAPI = capi;
initPrefetch(sq);
- initFilters();
+ if (OK != initFilters()) {
+ donePrefetch();
+ return NULL;
+ }
cronMaintenance(NULL);
addCronJob(&cronMaintenance,
10 * cronSECONDS,
Modified: GNUnet/src/applications/datastore/filter.c
===================================================================
--- GNUnet/src/applications/datastore/filter.c 2005-12-16 10:12:29 UTC (rev
2336)
+++ GNUnet/src/applications/datastore/filter.c 2005-12-17 03:54:49 UTC (rev
2337)
@@ -50,7 +50,7 @@
return bf;
}
-void initFilters() {
+int initFilters() {
char * bf;
unsigned int quota; /* in kb */
unsigned int * qt;
@@ -69,10 +69,14 @@
bf_size,
5); /* approx. 3% false positives at max use */
FREE(bf);
+ if (filter == NULL)
+ return SYSERR;
+ return OK;
}
void doneFilters() {
- freeBloomfilter(filter);
+ if (filter != NULL)
+ freeBloomfilter(filter);
}
void deleteFilter() {
Modified: GNUnet/src/applications/datastore/filter.h
===================================================================
--- GNUnet/src/applications/datastore/filter.h 2005-12-16 10:12:29 UTC (rev
2336)
+++ GNUnet/src/applications/datastore/filter.h 2005-12-17 03:54:49 UTC (rev
2337)
@@ -26,7 +26,7 @@
#ifndef FILTER_H
#define FILTER_H
-void initFilters();
+int initFilters();
void doneFilters();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2337 - GNUnet/src/applications/datastore,
grothoff <=