- remove adjust
[oweals/gnunet.git] / src / datastore / datastore_api.c
index 00a443fe481cf5ec5aba5e1533749d0a5e7801f1..6a994fbb04f043e431d13a7b5f000bb5263116c8 100644 (file)
@@ -293,10 +293,10 @@ disconnect_after_drop (void *cls,
 /**
  * Transmit DROP message to datastore service.
  *
- * @param cls the 'struct GNUNET_DATASTORE_Handle'
- * @param size number of bytes that can be copied to buf
+ * @param cls the `struct GNUNET_DATASTORE_Handle`
+ * @param size number of bytes that can be copied to @a buf
  * @param buf where to copy the drop message
- * @return number of bytes written to buf
+ * @return number of bytes written to @a buf
  */
 static size_t
 transmit_drop (void *cls, size_t size, void *buf)
@@ -327,7 +327,7 @@ transmit_drop (void *cls, size_t size, void *buf)
  * associated resources).
  *
  * @param h handle to the datastore
- * @param drop set to GNUNET_YES to delete all data in datastore (!)
+ * @param drop set to #GNUNET_YES to delete all data in datastore (!)
  */
 void
 GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop)
@@ -388,8 +388,9 @@ static void
 timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct GNUNET_DATASTORE_QueueEntry *qe = cls;
+  struct GNUNET_DATASTORE_Handle *h = qe->h;
 
-  GNUNET_STATISTICS_update (qe->h->stats,
+  GNUNET_STATISTICS_update (h->stats,
                             gettext_noop ("# queue entry timeouts"), 1,
                             GNUNET_NO);
   qe->task = GNUNET_SCHEDULER_NO_TASK;
@@ -511,7 +512,7 @@ process_queue (struct GNUNET_DATASTORE_Handle *h);
 /**
  * Try reconnecting to the datastore service.
  *
- * @param cls the 'struct GNUNET_DATASTORE_Handle'
+ * @param cls the `struct GNUNET_DATASTORE_Handle`
  * @param tc scheduler context
  */
 static void
@@ -593,10 +594,10 @@ receive_cb (void *cls, const struct GNUNET_MessageHeader *msg)
 /**
  * Transmit request from queue to datastore service.
  *
- * @param cls the 'struct GNUNET_DATASTORE_Handle'
- * @param size number of bytes that can be copied to buf
+ * @param cls the `struct GNUNET_DATASTORE_Handle`
+ * @param size number of bytes that can be copied to @a buf
  * @param buf where to copy the drop message
- * @return number of bytes written to buf
+ * @return number of bytes written to @a buf
  */
 static size_t
 transmit_request (void *cls, size_t size, void *buf)
@@ -834,7 +835,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
  *        (if other requests of higher priority are in the queue)
  * @param timeout timeout for the operation
  * @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
@@ -907,7 +908,7 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
  * @param timeout how long to wait at most for a response (or before dying in queue)
  * @param cont continuation to call when done; "success" will be set to
  *             a positive reservation value if space could be reserved.
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
@@ -935,7 +936,8 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
                          max_queue_size, timeout, &process_status_message, &qc);
   if (qe == NULL)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry to reserve\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Could not create queue entry to reserve\n");
     return NULL;
   }
   GNUNET_STATISTICS_update (h->stats,
@@ -967,7 +969,7 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
  *        (if other requests of higher priority are in the queue)
  * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
@@ -1023,7 +1025,7 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
  *        (if other requests of higher priority are in the queue)
  * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
@@ -1055,7 +1057,8 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
                          max_queue_size, timeout, &process_status_message, &qc);
   if (qe == NULL)
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for UPDATE\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Could not create queue entry for UPDATE\n");
     return NULL;
   }
   GNUNET_STATISTICS_update (h->stats,
@@ -1074,9 +1077,9 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
 
 /**
  * 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"
+ * The @a cont continuation 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
@@ -1088,7 +1091,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
  *        (if other requests of higher priority are in the queue)
  * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
- * @param cont_cls closure for cont
+ * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
@@ -1146,7 +1149,7 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
  * Type of a function to call when we receive a message
  * from the service.
  *
- * @param cls closure
+ * @param cls closure with the `struct GNUNET_DATASTORE_Handle *`
  * @param msg message received, NULL on timeout or fatal error
  */
 static void
@@ -1261,7 +1264,7 @@ process_result_message (void *cls, const struct GNUNET_MessageHeader *msg)
  * @param proc function to call on a random value; it
  *        will be called once with a value (if available)
  *        and always once with a value of NULL.
- * @param proc_cls closure for proc
+ * @param proc_cls closure for @a proc
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
@@ -1320,7 +1323,7 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
  * @param proc function to call on a random value; it
  *        will be called once with a value (if available)
  *        or with NULL if none value exists.
- * @param proc_cls closure for proc
+ * @param proc_cls closure for @a proc
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
@@ -1386,7 +1389,7 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
  * @param timeout how long to wait at most for a response
  * @param proc function to call on each matching value;
  *        will be called once with a NULL value at the end
- * @param proc_cls closure for proc
+ * @param proc_cls closure for @a proc
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */