[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37982 - gnunet/src/psycstore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37982 - gnunet/src/psycstore |
Date: |
Thu, 22 Sep 2016 18:55:07 +0200 |
Author: tg
Date: 2016-09-22 18:55:06 +0200 (Thu, 22 Sep 2016)
New Revision: 37982
Modified:
gnunet/src/psycstore/plugin_psycstore_mysql.c
gnunet/src/psycstore/psycstore.conf.in
gnunet/src/psycstore/test_plugin_psycstore_mysql.conf
Log:
psycstore-mysql: remove filename config option
Modified: gnunet/src/psycstore/plugin_psycstore_mysql.c
===================================================================
--- gnunet/src/psycstore/plugin_psycstore_mysql.c 2016-09-22 15:53:50 UTC
(rev 37981)
+++ gnunet/src/psycstore/plugin_psycstore_mysql.c 2016-09-22 16:55:06 UTC
(rev 37982)
@@ -81,13 +81,8 @@
const struct GNUNET_CONFIGURATION_Handle *cfg;
/**
- * Database filename.
+ * MySQL context.
*/
- char *fn;
-
- /**
- *Handle to talk to Mysql
- */
struct GNUNET_MYSQL_Context *mc;
/**
@@ -278,31 +273,8 @@
static int
database_setup (struct Plugin *plugin)
{
- char *filename;
-
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (plugin->cfg, "psycstore-mysql",
- "FILENAME", &filename))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "psycstore-mysql", "FILENAME");
- return GNUNET_SYSERR;
- }
-
- if (GNUNET_OK != GNUNET_DISK_file_test (filename))
- {
- if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (filename))
- {
- GNUNET_break (0);
- GNUNET_free (filename);
- return GNUNET_SYSERR;
- }
- }
- /* filename should be UTF-8-encoded. If it isn't, it's a bug */
- plugin->fn = filename;
-
/* Open database and precompile statements */
- plugin->mc = GNUNET_MYSQL_context_create(plugin->cfg, "psycstore-mysql");
+ plugin->mc = GNUNET_MYSQL_context_create (plugin->cfg, "psycstore-mysql");
if (NULL == plugin->mc)
{
@@ -601,9 +573,6 @@
database_shutdown (struct Plugin *plugin)
{
GNUNET_MYSQL_context_destroy (plugin->mc);
-
- GNUNET_free_non_null (plugin->fn);
-
}
Modified: gnunet/src/psycstore/psycstore.conf.in
===================================================================
--- gnunet/src/psycstore/psycstore.conf.in 2016-09-22 15:53:50 UTC (rev
37981)
+++ gnunet/src/psycstore/psycstore.conf.in 2016-09-22 16:55:06 UTC (rev
37982)
@@ -17,4 +17,9 @@
FILENAME = $GNUNET_DATA_HOME/psycstore/sqlite.db
[psycstore-mysql]
-FILENAME = $GNUNET_DATA_HOME/psycstore/mysql.sql
+DATABASE = gnunet
+CONFIG = ~/.my.cnf
+# USER = gnunet
+# PASSWORD =
+# HOST = localhost
+# PORT = 3306
Modified: gnunet/src/psycstore/test_plugin_psycstore_mysql.conf
===================================================================
--- gnunet/src/psycstore/test_plugin_psycstore_mysql.conf 2016-09-22
15:53:50 UTC (rev 37981)
+++ gnunet/src/psycstore/test_plugin_psycstore_mysql.conf 2016-09-22
16:55:06 UTC (rev 37982)
@@ -1,2 +1,7 @@
[psycstore-mysql]
-FILENAME = /tmp/gnunet-test-plugin-psycstore-mysql/mysql.sql
+DATABASE = test
+# CONFIG = ~/.my.cnf
+# USER = gnunet
+# PASSWORD =
+# HOST = localhost
+# PORT = 3306
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37982 - gnunet/src/psycstore,
gnunet <=