diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-03 15:24:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-03 15:24:08 +0000 |
commit | 84a70da19fdf98b028b98e23a228e32f591535fe (patch) | |
tree | 3fde202b9a1d16c4594c25f5a64dea15e989a160 /src/util/test_plugin.c | |
parent | 7ae7229d2de6a6ef842634265847a46ac46f8c5c (diff) | |
download | gnunet-84a70da19fdf98b028b98e23a228e32f591535fe.tar.gz gnunet-84a70da19fdf98b028b98e23a228e32f591535fe.zip |
implementing plugin directory scanner for #1746
Diffstat (limited to 'src/util/test_plugin.c')
-rw-r--r-- | src/util/test_plugin.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util/test_plugin.c b/src/util/test_plugin.c index 479edb3cb..dc34841f5 100644 --- a/src/util/test_plugin.c +++ b/src/util/test_plugin.c | |||
@@ -26,6 +26,17 @@ | |||
26 | 26 | ||
27 | #define VERBOSE GNUNET_EXTRA_LOGGING | 27 | #define VERBOSE GNUNET_EXTRA_LOGGING |
28 | 28 | ||
29 | static void | ||
30 | test_cb (void *cls, | ||
31 | const char *libname, | ||
32 | void *lib_ret) | ||
33 | { | ||
34 | GNUNET_assert (0 == strcmp (cls, "test")); | ||
35 | GNUNET_assert (0 == strcmp (lib_ret, "Hello")); | ||
36 | GNUNET_assert (0 == strcmp (GNUNET_PLUGIN_unload (libname, "out"), "World")); | ||
37 | } | ||
38 | |||
39 | |||
29 | static int | 40 | static int |
30 | check () | 41 | check () |
31 | { | 42 | { |
@@ -47,6 +58,8 @@ check () | |||
47 | if (0 != strcmp (ret, "World")) | 58 | if (0 != strcmp (ret, "World")) |
48 | return 4; | 59 | return 4; |
49 | free (ret); | 60 | free (ret); |
61 | |||
62 | GNUNET_PLUGIN_load_all ("libgnunet_plugin_tes", "in", &test_cb, "test"); | ||
50 | return 0; | 63 | return 0; |
51 | } | 64 | } |
52 | 65 | ||