[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8933 - in gnunet/src: datastore fs include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8933 - in gnunet/src: datastore fs include |
Date: |
Wed, 2 Sep 2009 14:07:59 -0600 |
Author: grothoff
Date: 2009-09-02 14:07:59 -0600 (Wed, 02 Sep 2009)
New Revision: 8933
Modified:
gnunet/src/datastore/gnunet-service-datastore.c
gnunet/src/fs/fs_unindex.c
gnunet/src/include/gnunet_datastore_service.h
Log:
fixing datastore API, improving unindex
Modified: gnunet/src/datastore/gnunet-service-datastore.c
===================================================================
--- gnunet/src/datastore/gnunet-service-datastore.c 2009-09-02 19:55:10 UTC
(rev 8932)
+++ gnunet/src/datastore/gnunet-service-datastore.c 2009-09-02 20:07:59 UTC
(rev 8933)
@@ -1016,7 +1016,7 @@
if (GNUNET_YES == rc->found)
transmit_status (rc->client, GNUNET_OK, NULL);
else
- transmit_status (rc->client, GNUNET_SYSERR, _("Content not found"));
+ transmit_status (rc->client, GNUNET_NO, _("Content not found"));
GNUNET_SERVER_client_drop (rc->client);
GNUNET_free (rc);
return GNUNET_OK; /* last item */
Modified: gnunet/src/fs/fs_unindex.c
===================================================================
--- gnunet/src/fs/fs_unindex.c 2009-09-02 19:55:10 UTC (rev 8932)
+++ gnunet/src/fs/fs_unindex.c 2009-09-02 20:07:59 UTC (rev 8933)
@@ -79,26 +79,6 @@
/**
- * Continuation called to notify client about result of the
- * datastore removal operation.
- *
- * @param cls closure
- * @param success GNUNET_SYSERR on failure
- * @param msg NULL on success, otherwise an error message
- */
-static void
-process_cont (void *cls,
- int success,
- const char *msg)
-{
- struct GNUNET_FS_UnindexContext *uc = cls;
- // FIXME: may want to check for errors
- // OTHER than content-not-present!
- GNUNET_FS_tree_encoder_next (uc->tc);
-}
-
-
-/**
* Function called asking for the current (encoded)
* block to be processed. After processing the
* client should either call "GNUNET_FS_tree_encode_next"
@@ -227,6 +207,31 @@
/**
+ * Continuation called to notify client about result of the
+ * datastore removal operation.
+ *
+ * @param cls closure
+ * @param success GNUNET_SYSERR on failure
+ * @param msg NULL on success, otherwise an error message
+ */
+static void
+process_cont (void *cls,
+ int success,
+ const char *msg)
+{
+ struct GNUNET_FS_UnindexContext *uc = cls;
+ if (success == GNUNET_SYSERR)
+ {
+ signal_unindex_error (uc,
+ emsg);
+ return;
+ }
+
+ GNUNET_FS_tree_encoder_next (uc->tc);
+}
+
+
+/**
* Function called when the tree encoder has
* processed all blocks. Clean up.
*
Modified: gnunet/src/include/gnunet_datastore_service.h
===================================================================
--- gnunet/src/include/gnunet_datastore_service.h 2009-09-02 19:55:10 UTC
(rev 8932)
+++ gnunet/src/include/gnunet_datastore_service.h 2009-09-02 20:07:59 UTC
(rev 8933)
@@ -254,6 +254,10 @@
/**
* Explicitly remove some content from the database.
+ * The "cont"inuation will be called with status
+ * "GNUNET_OK" if content was removed, "GNUNET_NO"
+ * if no matching entry was found and "GNUNET_SYSERR"
+ * on all other types of errors.
*
* @param h handle to the datastore
* @param key key for the value
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8933 - in gnunet/src: datastore fs include,
gnunet <=