diff options
author | bartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-21 13:37:46 +0000 |
---|---|---|
committer | bartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-21 13:37:46 +0000 |
commit | 77bb972b2a6adfc893b4477a87f29a02aecbff8a (patch) | |
tree | 5f6aed68901a4d723153a903a04596e76c25f2c4 /src/regex/plugin_block_regex.c | |
parent | e04a358cf389ef9b0de19d5c9d07c82222271a6e (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.c | 15 |
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; } } |