aboutsummaryrefslogtreecommitdiff
path: root/src/regex/plugin_block_regex.c
diff options
context:
space:
mode:
authorbartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96>2013-01-21 13:37:46 +0000
committerbartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96>2013-01-21 13:37:46 +0000
commit77bb972b2a6adfc893b4477a87f29a02aecbff8a (patch)
tree5f6aed68901a4d723153a903a04596e76c25f2c4 /src/regex/plugin_block_regex.c
parente04a358cf389ef9b0de19d5c9d07c82222271a6e (diff)
- fix
git-svn-id: https://gnunet.org/svn/gnunet@25840 140774ce-b5e7-0310-ab8b-a85725594a96
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;
}
}