/**
- * Handle an incoming message of type 'GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE'
+ * Handle an incoming message of type #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
*
* @param qe the respective entry in the message queue
* @param msg the message we received
* @param size the message size
- * @return GNUNET_OK on success, GNUNET_NO if we notified the client about
- * the error, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_NO if we notified the client about
+ * the error, #GNUNET_SYSERR on error and we did NOT notify the client
*/
static int
handle_zone_to_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe,
*
* @param qe the respective zone iteration handle
* @param msg the message we received
- * @param type the message type in HBO
+ * @param type the message type in host byte order
* @param size the message size
- * @return GNUNET_OK on success, GNUNET_NO if we notified the client about
- * the error, GNUNET_SYSERR on error and we did NOT notify the client
+ * @return #GNUNET_OK on success, #GNUNET_NO if we notified the client about
+ * the error, #GNUNET_SYSERR on error and we did NOT notify the client
*/
static int
manage_record_operations (struct GNUNET_NAMESTORE_QueueEntry *qe,
* @param ze the respective iterator for this operation
* @param msg the message containing the respoonse
* @param size the message size
- * @return GNUNET_YES on success, 'ze' should be kept, GNUNET_NO on success if 'ze' should
- * not be kept any longer, GNUNET_SYSERR on error (disconnect) and 'ze' should be kept
+ * @return #GNUNET_YES on success, @a ze should be kept, #GNUNET_NO on success if @a ze should
+ * not be kept any longer, #GNUNET_SYSERR on error (disconnect) and @a ze should be kept
*/
static int
handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
}
if ((0 == name_len) && (0 == (memcmp (&msg->private_key, &priv_dummy, sizeof (priv_dummy)))))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Zone iteration is completed!\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Zone iteration is completed!\n");
if (NULL != ze->proc)
ze->proc (ze->proc_cls, NULL, NULL, 0, NULL);
return GNUNET_NO;
* @param msg the message we received
* @param type the message type in HBO
* @param size the message size
- * @return GNUNET_YES on success, 'ze' should be kept, GNUNET_NO on success if 'ze' should
- * not be kept any longer, GNUNET_SYSERR on error (disconnect) and 'ze' should be kept
+ * @return #GNUNET_YES on success, @a ze should be kept, #GNUNET_NO on success if @a ze should
+ * not be kept any longer, #GNUNET_SYSERR on error (disconnect) and @a ze should be kept
*/
static int
manage_zone_operations (struct GNUNET_NAMESTORE_ZoneIterator *ze,
* Type of a function to call when we receive a message
* from the service.
*
- * @param cls the 'struct GNUNET_NAMESTORE_SchedulingHandle'
+ * @param cls the `struct GNUNET_NAMESTORE_SchedulingHandle`
* @param msg message received, NULL on timeout or fatal error
*/
static void
GNUNET_free (qe);
}
}
-
- /* Is it a zone iteration operation ? */
+ /* Is it a zone iteration operation? */
for (ze = h->z_head; ze != NULL; ze = ze->next)
if (ze->op_id == r_id)
break;
/**
* Starts a new zone iteration (used to periodically PUT all of our
- * records into our DHT). This MUST lock the GNUNET_NAMESTORE_Handle
- * for any other calls than GNUNET_NAMESTORE_zone_iterator_next and
- * GNUNET_NAMESTORE_zone_iteration_stop. "proc" will be called once
+ * records into our DHT). This MUST lock the struct GNUNET_NAMESTORE_Handle
+ * for any other calls than #GNUNET_NAMESTORE_zone_iterator_next and
+ * #GNUNET_NAMESTORE_zone_iteration_stop. @a proc will be called once
* immediately, and then again after
- * "GNUNET_NAMESTORE_zone_iterator_next" is invoked.
+ * #GNUNET_NAMESTORE_zone_iterator_next is invoked.
*
* @param h handle to the namestore
- * @param zone zone to access
+ * @param zone zone to access, NULL for all zones
* @param proc function to call on each name from the zone; it
* will be called repeatedly with a value (if available)
* and always once at the end with a name of NULL.
- * @param proc_cls closure for proc
+ * @param proc_cls closure for @a proc
* @return an iterator handle to use for iteration
*/
struct GNUNET_NAMESTORE_ZoneIterator *
it->proc = proc;
it->proc_cls = proc_cls;
it->op_id = rid;
- it->zone = *zone;
+ if (NULL != zone)
+ it->zone = *zone;
GNUNET_CONTAINER_DLL_insert_tail (h->z_head, h->z_tail, it);
msg_size = sizeof (struct ZoneIterationStartMessage);
msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START);
msg->gns_header.header.size = htons (msg_size);
msg->gns_header.r_id = htonl (rid);
- msg->zone = *zone;
+ if (NULL != zone)
+ msg->zone = *zone;
GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
do_transmit(h);
return it;
/**
- * Calls the record processor specified in GNUNET_NAMESTORE_zone_iteration_start
+ * Calls the record processor specified in #GNUNET_NAMESTORE_zone_iteration_start
* for the next record.
*
* @param it the iterator