aboutsummaryrefslogtreecommitdiff
path: root/src/setup/gnunet-setup-datastore-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup/gnunet-setup-datastore-config.c')
-rw-r--r--src/setup/gnunet-setup-datastore-config.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/src/setup/gnunet-setup-datastore-config.c b/src/setup/gnunet-setup-datastore-config.c
index 86925418..2c7ede51 100644
--- a/src/setup/gnunet-setup-datastore-config.c
+++ b/src/setup/gnunet-setup-datastore-config.c
@@ -45,11 +45,10 @@ duc_dummy (void *cls, int delta)
45static int 45static int
46test_config (const char *name) 46test_config (const char *name)
47{ 47{
48 struct GNUNET_DATASTORE_PluginEnvironment env = 48 struct GNUNET_DATASTORE_PluginEnvironment env = {
49 { 49 cfg,
50 cfg, 50 &duc_dummy, NULL
51 &duc_dummy, NULL 51 };
52 };
53 void *ret; 52 void *ret;
54 53
55 ret = GNUNET_PLUGIN_load (name, &env); 54 ret = GNUNET_PLUGIN_load (name, &env);
@@ -91,41 +90,38 @@ GNUNET_setup_datastore_postgres_invalidate_cb ()
91 90
92 91
93void 92void
94GNUNET_setup_datastore_mysql_tab_test_button_clicked_cb (GtkWidget *widget, 93GNUNET_setup_datastore_mysql_tab_test_button_clicked_cb (GtkWidget * widget,
95 gpointer user_data) 94 gpointer user_data)
96{ 95{
97 if (GNUNET_OK == 96 if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_mysql"))
98 test_config ("libgnunet_plugin_datastore_mysql")) 97 {
99 { 98 show ("GNUNET_setup_datastore_mysql_tab_ok_image");
100 show ("GNUNET_setup_datastore_mysql_tab_ok_image"); 99 hide ("GNUNET_setup_datastore_mysql_tab_error_image");
101 hide ("GNUNET_setup_datastore_mysql_tab_error_image"); 100 }
102 }
103 else 101 else
104 { 102 {
105 hide ("GNUNET_setup_datastore_mysql_tab_ok_image"); 103 hide ("GNUNET_setup_datastore_mysql_tab_ok_image");
106 show ("GNUNET_setup_datastore_mysql_tab_error_image"); 104 show ("GNUNET_setup_datastore_mysql_tab_error_image");
107 } 105 }
108} 106}
109 107
110 108
111void 109void
112GNUNET_setup_datastore_postgres_tab_test_button_clicked_cb (GtkWidget *widget, 110GNUNET_setup_datastore_postgres_tab_test_button_clicked_cb (GtkWidget * widget,
113 gpointer user_data) 111 gpointer user_data)
114{ 112{
115 if (GNUNET_OK == 113 if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_postgres"))
116 test_config ("libgnunet_plugin_datastore_postgres")) 114 {
117 { 115 show ("GNUNET_setup_datastore_postgres_tab_ok_image");
118 show ("GNUNET_setup_datastore_postgres_tab_ok_image"); 116 hide ("GNUNET_setup_datastore_postgres_tab_error_image");
119 hide ("GNUNET_setup_datastore_postgres_tab_error_image"); 117 }
120 }
121 else 118 else
122 { 119 {
123 hide ("GNUNET_setup_datastore_postgres_tab_ok_image"); 120 hide ("GNUNET_setup_datastore_postgres_tab_ok_image");
124 show ("GNUNET_setup_datastore_postgres_tab_error_image"); 121 show ("GNUNET_setup_datastore_postgres_tab_error_image");
125 } 122 }
126} 123}
127 124
128 125
129 126
130/* end of gnunet-setup-datastore-config.c */ 127/* end of gnunet-setup-datastore-config.c */
131