From 2b869471ca92027e0ffa1d8180585055d7698762 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 11 Mar 2013 14:51:21 +0000 Subject: - allow GNUNET_BLOCK_evaluate on PUT requests for regex blocks --- src/regex/regex_block_lib.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/regex/regex_block_lib.h') diff --git a/src/regex/regex_block_lib.h b/src/regex/regex_block_lib.h index f591f5f61..ca7a2ee22 100644 --- a/src/regex/regex_block_lib.h +++ b/src/regex/regex_block_lib.h @@ -39,14 +39,15 @@ extern "C" #include "block_regex.h" /** - * Check if the regex block is well formed, including all edges + * Check if the regex block is well formed, including all edges. * * @param block The start of the block. * @param size The size of the block. * @param xquery String describing the edge we are looking for. + * Can be NULL in case this is a put block. * * @return GNUNET_OK in case it's fine. - * GNUNET_NO in case the xquery is not found. + * GNUNET_NO in case the xquery exists and is not found (IRRELEVANT). * GNUNET_SYSERR if the block is invalid. */ int @@ -78,7 +79,13 @@ typedef int (*GNUNET_REGEX_EgdeIterator)(void *cls, * @param iterator Function to call on each edge in the block. * @param iter_cls Closure for the iterator. * - * @return GNUNET_SYSERR if an error has been encountered, GNUNET_OK otherwise + * @return GNUNET_SYSERR if an error has been encountered. + * GNUNET_OK if no error has been encountered. + * Note that if the iterator stops the iteration by returning + * GNUNET_NO, the block will no longer be checked for further errors. + * The return value will be GNUNET_OK meaning that no errors were + * found until the edge last notified to the iterator, but there might + * be errors in further edges. */ int GNUNET_REGEX_block_iterate (const struct RegexBlock *block, -- cgit v1.2.3