diff options
Diffstat (limited to 'src/setup/gnunet-setup-datacache-config.c')
-rw-r--r-- | src/setup/gnunet-setup-datacache-config.c | 64 |
1 files changed, 29 insertions, 35 deletions
diff --git a/src/setup/gnunet-setup-datacache-config.c b/src/setup/gnunet-setup-datacache-config.c index f779d8c4..c777f5ff 100644 --- a/src/setup/gnunet-setup-datacache-config.c +++ b/src/setup/gnunet-setup-datacache-config.c | |||
@@ -30,9 +30,7 @@ | |||
30 | * Stub implementation of the 'DeleteNotifyCallback' callback. | 30 | * Stub implementation of the 'DeleteNotifyCallback' callback. |
31 | */ | 31 | */ |
32 | static void | 32 | static void |
33 | dnc_dummy (void *cls, | 33 | dnc_dummy (void *cls, const GNUNET_HashCode * key, size_t size) |
34 | const GNUNET_HashCode *key, | ||
35 | size_t size) | ||
36 | { | 34 | { |
37 | /* do nothing */ | 35 | /* do nothing */ |
38 | } | 36 | } |
@@ -47,13 +45,12 @@ dnc_dummy (void *cls, | |||
47 | static int | 45 | static int |
48 | test_config (const char *name) | 46 | test_config (const char *name) |
49 | { | 47 | { |
50 | struct GNUNET_DATACACHE_PluginEnvironment env = | 48 | struct GNUNET_DATACACHE_PluginEnvironment env = { |
51 | { | 49 | cfg, |
52 | cfg, | 50 | "dhtcache", |
53 | "dhtcache", | 51 | NULL, &dnc_dummy, |
54 | NULL, &dnc_dummy, | 52 | 1024LL |
55 | 1024LL | 53 | }; |
56 | }; | ||
57 | void *ret; | 54 | void *ret; |
58 | 55 | ||
59 | ret = GNUNET_PLUGIN_load (name, &env); | 56 | ret = GNUNET_PLUGIN_load (name, &env); |
@@ -95,41 +92,38 @@ GNUNET_setup_datacache_postgres_invalidate_cb () | |||
95 | 92 | ||
96 | 93 | ||
97 | void | 94 | void |
98 | GNUNET_setup_datacache_mysql_tab_test_button_clicked_cb (GtkWidget *widget, | 95 | GNUNET_setup_datacache_mysql_tab_test_button_clicked_cb (GtkWidget * widget, |
99 | gpointer user_data) | 96 | gpointer user_data) |
100 | { | 97 | { |
101 | if (GNUNET_OK == | 98 | if (GNUNET_OK == test_config ("libgnunet_plugin_datacache_mysql")) |
102 | test_config ("libgnunet_plugin_datacache_mysql")) | 99 | { |
103 | { | 100 | show ("GNUNET_setup_datacache_mysql_tab_ok_image"); |
104 | show ("GNUNET_setup_datacache_mysql_tab_ok_image"); | 101 | hide ("GNUNET_setup_datacache_mysql_tab_error_image"); |
105 | hide ("GNUNET_setup_datacache_mysql_tab_error_image"); | 102 | } |
106 | } | ||
107 | else | 103 | else |
108 | { | 104 | { |
109 | hide ("GNUNET_setup_datacache_mysql_tab_ok_image"); | 105 | hide ("GNUNET_setup_datacache_mysql_tab_ok_image"); |
110 | show ("GNUNET_setup_datacache_mysql_tab_error_image"); | 106 | show ("GNUNET_setup_datacache_mysql_tab_error_image"); |
111 | } | 107 | } |
112 | } | 108 | } |
113 | 109 | ||
114 | 110 | ||
115 | void | 111 | void |
116 | GNUNET_setup_datacache_postgres_tab_test_button_clicked_cb (GtkWidget *widget, | 112 | GNUNET_setup_datacache_postgres_tab_test_button_clicked_cb (GtkWidget * widget, |
117 | gpointer user_data) | 113 | gpointer user_data) |
118 | { | 114 | { |
119 | if (GNUNET_OK == | 115 | if (GNUNET_OK == test_config ("libgnunet_plugin_datacache_postgres")) |
120 | test_config ("libgnunet_plugin_datacache_postgres")) | 116 | { |
121 | { | 117 | show ("GNUNET_setup_datacache_postgres_tab_ok_image"); |
122 | show ("GNUNET_setup_datacache_postgres_tab_ok_image"); | 118 | hide ("GNUNET_setup_datacache_postgres_tab_error_image"); |
123 | hide ("GNUNET_setup_datacache_postgres_tab_error_image"); | 119 | } |
124 | } | ||
125 | else | 120 | else |
126 | { | 121 | { |
127 | hide ("GNUNET_setup_datacache_postgres_tab_ok_image"); | 122 | hide ("GNUNET_setup_datacache_postgres_tab_ok_image"); |
128 | show ("GNUNET_setup_datacache_postgres_tab_error_image"); | 123 | show ("GNUNET_setup_datacache_postgres_tab_error_image"); |
129 | } | 124 | } |
130 | } | 125 | } |
131 | 126 | ||
132 | 127 | ||
133 | 128 | ||
134 | /* end of gnunet-setup-datacache-config.c */ | 129 | /* end of gnunet-setup-datacache-config.c */ |
135 | |||