diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-29 08:06:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-29 08:06:54 +0000 |
commit | f4d2a974968ab6a3e83815a68dc6b98588105277 (patch) | |
tree | 3af1b060ee55c28a4262e4c0a95f7d06eb8e6384 /src/datacache/plugin_datacache_sqlite.c | |
parent | b0a50c0e1fd6e5434c7e53e4b55748368247e839 (diff) | |
download | gnunet-f4d2a974968ab6a3e83815a68dc6b98588105277.tar.gz gnunet-f4d2a974968ab6a3e83815a68dc6b98588105277.zip |
-doxygen
Diffstat (limited to 'src/datacache/plugin_datacache_sqlite.c')
-rw-r--r-- | src/datacache/plugin_datacache_sqlite.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 3d21df5a9..d28233772 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c | |||
@@ -621,36 +621,42 @@ libgnunet_plugin_datacache_sqlite_done (void *cls) | |||
621 | #if !WINDOWS || defined(__CYGWIN__) | 621 | #if !WINDOWS || defined(__CYGWIN__) |
622 | if ( (NULL != plugin->fn) && | 622 | if ( (NULL != plugin->fn) && |
623 | (0 != UNLINK (plugin->fn)) ) | 623 | (0 != UNLINK (plugin->fn)) ) |
624 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn); | 624 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, |
625 | "unlink", | ||
626 | plugin->fn); | ||
625 | GNUNET_free_non_null (plugin->fn); | 627 | GNUNET_free_non_null (plugin->fn); |
626 | #endif | 628 | #endif |
627 | result = sqlite3_close (plugin->dbh); | 629 | result = sqlite3_close (plugin->dbh); |
628 | #if SQLITE_VERSION_NUMBER >= 3007000 | 630 | #if SQLITE_VERSION_NUMBER >= 3007000 |
629 | if (result == SQLITE_BUSY) | 631 | if (SQLITE_BUSY == result) |
630 | { | 632 | { |
631 | LOG (GNUNET_ERROR_TYPE_WARNING, | 633 | LOG (GNUNET_ERROR_TYPE_WARNING, |
632 | _ | 634 | _("Tried to close sqlite without finalizing all prepared statements.\n")); |
633 | ("Tried to close sqlite without finalizing all prepared statements.\n")); | ||
634 | stmt = sqlite3_next_stmt (plugin->dbh, NULL); | 635 | stmt = sqlite3_next_stmt (plugin->dbh, NULL); |
635 | while (stmt != NULL) | 636 | while (NULL != stmt) |
636 | { | 637 | { |
637 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Closing statement %p\n", stmt); | ||
638 | result = sqlite3_finalize (stmt); | 638 | result = sqlite3_finalize (stmt); |
639 | if (result != SQLITE_OK) | 639 | if (result != SQLITE_OK) |
640 | LOG (GNUNET_ERROR_TYPE_WARNING, _("Failed to close statement %p: %d\n"), | 640 | LOG (GNUNET_ERROR_TYPE_WARNING, |
641 | stmt, result); | 641 | "Failed to close statement %p: %d\n", |
642 | stmt, | ||
643 | result); | ||
642 | stmt = sqlite3_next_stmt (plugin->dbh, NULL); | 644 | stmt = sqlite3_next_stmt (plugin->dbh, NULL); |
643 | } | 645 | } |
644 | result = sqlite3_close (plugin->dbh); | 646 | result = sqlite3_close (plugin->dbh); |
645 | } | 647 | } |
646 | #endif | 648 | #endif |
647 | if (SQLITE_OK != result) | 649 | if (SQLITE_OK != result) |
648 | LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close"); | 650 | LOG_SQLITE (plugin->dbh, |
651 | GNUNET_ERROR_TYPE_ERROR, | ||
652 | "sqlite3_close"); | ||
649 | 653 | ||
650 | #if WINDOWS && !defined(__CYGWIN__) | 654 | #if WINDOWS && !defined(__CYGWIN__) |
651 | if ( (NULL != plugin->fn) && | 655 | if ( (NULL != plugin->fn) && |
652 | (0 != UNLINK (plugin->fn)) ) | 656 | (0 != UNLINK (plugin->fn)) ) |
653 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn); | 657 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, |
658 | "unlink", | ||
659 | plugin->fn); | ||
654 | GNUNET_free_non_null (plugin->fn); | 660 | GNUNET_free_non_null (plugin->fn); |
655 | #endif | 661 | #endif |
656 | GNUNET_free (plugin); | 662 | GNUNET_free (plugin); |