aboutsummaryrefslogtreecommitdiff
path: root/src/regex/plugin_block_regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/plugin_block_regex.c')
-rw-r--r--src/regex/plugin_block_regex.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index 9a5ab33ecf..dc02b53cf2 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -176,10 +176,17 @@ block_plugin_regex_get_key (void *cls, enum GNUNET_BLOCK_Type type,
{
switch (type)
{
- default:
- /* FIXME */
- GNUNET_break (0);
- return GNUNET_SYSERR;
+ case GNUNET_BLOCK_TYPE_REGEX:
+ GNUNET_assert (sizeof (struct RegexBlock) <= block_size);
+ *key = ((struct RegexBlock *) block)->key;
+ return GNUNET_OK;
+ case GNUNET_BLOCK_TYPE_REGEX_ACCEPT:
+ GNUNET_assert (sizeof (struct RegexAccept) <= block_size);
+ *key = ((struct RegexAccept *) block)->key;
+ return GNUNET_OK;
+ default:
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
}
}