diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-10-11 16:13:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-10-11 16:13:03 +0000 |
commit | a623242075d23c9f7f4530c2fda5073e1658603f (patch) | |
tree | b9b9d036293ede6c1b726d495b77de813d1a2b4d /src/mysql/mysql.c | |
parent | 4e6147ce59183ef1ad3befd99bb5455e53e2803a (diff) | |
download | gnunet-a623242075d23c9f7f4530c2fda5073e1658603f.tar.gz gnunet-a623242075d23c9f7f4530c2fda5073e1658603f.zip |
deprecate USE_SSL for USE_TLS, rename in code
Diffstat (limited to 'src/mysql/mysql.c')
-rw-r--r-- | src/mysql/mysql.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c index acd54a288..bebbfbe0f 100644 --- a/src/mysql/mysql.c +++ b/src/mysql/mysql.c | |||
@@ -197,7 +197,7 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
197 | * our default options). | 197 | * our default options). |
198 | * | 198 | * |
199 | * @param mc database context to initialze | 199 | * @param mc database context to initialze |
200 | * @return GNUNET_OK on success | 200 | * @return #GNUNET_OK on success |
201 | */ | 201 | */ |
202 | static int | 202 | static int |
203 | iopen (struct GNUNET_MYSQL_Context *mc) | 203 | iopen (struct GNUNET_MYSQL_Context *mc) |
@@ -300,7 +300,8 @@ GNUNET_MYSQL_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
300 | mc = GNUNET_new (struct GNUNET_MYSQL_Context); | 300 | mc = GNUNET_new (struct GNUNET_MYSQL_Context); |
301 | mc->cfg = cfg; | 301 | mc->cfg = cfg; |
302 | mc->section = section; | 302 | mc->section = section; |
303 | mc->cnffile = get_my_cnf_path (cfg, section); | 303 | mc->cnffile = get_my_cnf_path (cfg, |
304 | section); | ||
304 | 305 | ||
305 | return mc; | 306 | return mc; |
306 | } | 307 | } |
@@ -383,18 +384,22 @@ GNUNET_MYSQL_statement_prepare (struct GNUNET_MYSQL_Context *mc, | |||
383 | * | 384 | * |
384 | * @param mc mysql context | 385 | * @param mc mysql context |
385 | * @param sql SQL statement to run | 386 | * @param sql SQL statement to run |
386 | * @return GNUNET_OK on success | 387 | * @return #GNUNET_OK on success |
387 | * GNUNET_SYSERR if there was a problem | 388 | * #GNUNET_SYSERR if there was a problem |
388 | */ | 389 | */ |
389 | int | 390 | int |
390 | GNUNET_MYSQL_statement_run (struct GNUNET_MYSQL_Context *mc, const char *sql) | 391 | GNUNET_MYSQL_statement_run (struct GNUNET_MYSQL_Context *mc, |
392 | const char *sql) | ||
391 | { | 393 | { |
392 | if ((NULL == mc->dbf) && (GNUNET_OK != iopen (mc))) | 394 | if ( (NULL == mc->dbf) && |
395 | (GNUNET_OK != iopen (mc)) ) | ||
393 | return GNUNET_SYSERR; | 396 | return GNUNET_SYSERR; |
394 | mysql_query (mc->dbf, sql); | 397 | mysql_query (mc->dbf, sql); |
395 | if (mysql_error (mc->dbf)[0]) | 398 | if (mysql_error (mc->dbf)[0]) |
396 | { | 399 | { |
397 | LOG_MYSQL (GNUNET_ERROR_TYPE_ERROR, "mysql_query", mc); | 400 | LOG_MYSQL (GNUNET_ERROR_TYPE_ERROR, |
401 | "mysql_query", | ||
402 | mc); | ||
398 | GNUNET_MYSQL_statements_invalidate (mc); | 403 | GNUNET_MYSQL_statements_invalidate (mc); |
399 | return GNUNET_SYSERR; | 404 | return GNUNET_SYSERR; |
400 | } | 405 | } |
@@ -407,7 +412,7 @@ GNUNET_MYSQL_statement_run (struct GNUNET_MYSQL_Context *mc, const char *sql) | |||
407 | * | 412 | * |
408 | * @param mc mysql context | 413 | * @param mc mysql context |
409 | * @param sh statement handle to prepare | 414 | * @param sh statement handle to prepare |
410 | * @return GNUNET_OK on success | 415 | * @return #GNUNET_OK on success |
411 | */ | 416 | */ |
412 | static int | 417 | static int |
413 | prepare_statement (struct GNUNET_MYSQL_StatementHandle *sh) | 418 | prepare_statement (struct GNUNET_MYSQL_StatementHandle *sh) |