diff options
Diffstat (limited to 'src/peerstore/gnunet-service-peerstore.c')
-rw-r--r-- | src/peerstore/gnunet-service-peerstore.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index 418e33703..d0359ad50 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c | |||
@@ -33,6 +33,11 @@ | |||
33 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 33 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Database plugin library name | ||
37 | */ | ||
38 | char *db_lib_name; | ||
39 | |||
40 | /** | ||
36 | * Database handle | 41 | * Database handle |
37 | */ | 42 | */ |
38 | static struct GNUNET_PEERSTORE_PluginFunctions *db; | 43 | static struct GNUNET_PEERSTORE_PluginFunctions *db; |
@@ -47,6 +52,12 @@ static void | |||
47 | shutdown_task (void *cls, | 52 | shutdown_task (void *cls, |
48 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 53 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
49 | { | 54 | { |
55 | if(NULL != db_lib_name) | ||
56 | { | ||
57 | GNUNET_break (NULL == GNUNET_PLUGIN_unload (db_lib_name, db)); | ||
58 | GNUNET_free (db_lib_name); | ||
59 | db_lib_name = NULL; | ||
60 | } | ||
50 | } | 61 | } |
51 | 62 | ||
52 | 63 | ||
@@ -79,7 +90,6 @@ run (void *cls, | |||
79 | {NULL, NULL, 0, 0} | 90 | {NULL, NULL, 0, 0} |
80 | }; | 91 | }; |
81 | char *database; | 92 | char *database; |
82 | char *db_lib_name; | ||
83 | 93 | ||
84 | cfg = c; | 94 | cfg = c; |
85 | if (GNUNET_OK != | 95 | if (GNUNET_OK != |