aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-27 13:10:14 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-27 13:10:14 +0000
commit4c26b95ce21d754f0270fdb9ed6d26c24c852568 (patch)
tree6cd06e16071ed8ab3ff927864e2383cd7250b242 /src/datacache/plugin_datacache_postgres.c
parent4a0fde5717d9569f602d30541d48a4484acb3baa (diff)
downloadgnunet-4c26b95ce21d754f0270fdb9ed6d26c24c852568.tar.gz
gnunet-4c26b95ce21d754f0270fdb9ed6d26c24c852568.zip
fix
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r--src/datacache/plugin_datacache_postgres.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index e1cf334ef..50d464a70 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -267,10 +267,11 @@ init_connection (struct Plugin *plugin)
267 */ 267 */
268static int 268static int
269delete_by_rowid (struct Plugin *plugin, 269delete_by_rowid (struct Plugin *plugin,
270 unsigned int rowid) 270 uint32_t rowid)
271{ 271{
272 const char *paramValues[] = { (const char *) &rowid }; 272 uint32_t brow = htonl (rowid);
273 int paramLengths[] = { sizeof (rowid) }; 273 const char *paramValues[] = { (const char *) &brow };
274 int paramLengths[] = { sizeof (brow) };
274 const int paramFormats[] = { 1 }; 275 const int paramFormats[] = { 1 };
275 PGresult *ret; 276 PGresult *ret;
276 277
@@ -566,8 +567,6 @@ libgnunet_plugin_datacache_postgres_done (void *cls)
566 struct GNUNET_DATACACHE_PluginFunctions *api = cls; 567 struct GNUNET_DATACACHE_PluginFunctions *api = cls;
567 struct Plugin *plugin = api->cls; 568 struct Plugin *plugin = api->cls;
568 569
569 fprintf (stderr,
570 "Unloading postgres plugin\n");
571 PQfinish (plugin->dbh); 570 PQfinish (plugin->dbh);
572 GNUNET_free (plugin); 571 GNUNET_free (plugin);
573 GNUNET_free (api); 572 GNUNET_free (api);