diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-02-06 17:33:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-02-06 17:33:40 +0000 |
commit | 85cc361c21c0e1e45d1f2c0fd2ce7c3ee1e2528c (patch) | |
tree | 26e0c875d6db9f2fa792c9703fcea532589e521f /src/namestore | |
parent | b7f29be97540eca5c2d5d2c7802849aec87e70c0 (diff) | |
download | gnunet-85cc361c21c0e1e45d1f2c0fd2ce7c3ee1e2528c.tar.gz gnunet-85cc361c21c0e1e45d1f2c0fd2ce7c3ee1e2528c.zip |
make some more use of libgnunetpq
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/Makefile.am | 5 | ||||
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 62d433a11..887dea4ed 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -179,6 +179,7 @@ libgnunet_plugin_namestore_postgres_la_SOURCES = \ | |||
179 | libgnunet_plugin_namestore_postgres_la_LIBADD = \ | 179 | libgnunet_plugin_namestore_postgres_la_LIBADD = \ |
180 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ | 180 | $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \ |
181 | $(top_builddir)/src/postgres/libgnunetpostgres.la \ | 181 | $(top_builddir)/src/postgres/libgnunetpostgres.la \ |
182 | $(top_builddir)/src/pq/libgnunetpq.la \ | ||
182 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 183 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
183 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \ | 184 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \ |
184 | $(LTLIBINTL) | 185 | $(LTLIBINTL) |
@@ -189,8 +190,8 @@ libgnunet_plugin_rest_namestore_la_SOURCES = \ | |||
189 | plugin_rest_namestore.c | 190 | plugin_rest_namestore.c |
190 | libgnunet_plugin_rest_namestore_la_LIBADD = \ | 191 | libgnunet_plugin_rest_namestore_la_LIBADD = \ |
191 | libgnunetnamestore.la \ | 192 | libgnunetnamestore.la \ |
192 | $(top_builddir)/src/rest/libgnunetrest.la \ | 193 | $(top_builddir)/src/rest/libgnunetrest.la \ |
193 | $(top_builddir)/src/identity/libgnunetidentity.la \ | 194 | $(top_builddir)/src/identity/libgnunetidentity.la \ |
194 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ | 195 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ |
195 | $(LTLIBINTL) -ljansson -lmicrohttpd | 196 | $(LTLIBINTL) -ljansson -lmicrohttpd |
196 | libgnunet_plugin_rest_namestore_la_LDFLAGS = \ | 197 | libgnunet_plugin_rest_namestore_la_LDFLAGS = \ |
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 599c7ef2e..9118ca5cf 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of GNUnet | 2 | * This file is part of GNUnet |
3 | * Copyright (C) 2009-2013 GNUnet e.V. | 3 | * Copyright (C) 2009-2013, 2016 GNUnet e.V. |
4 | * | 4 | * |
5 | * GNUnet is free software; you can redistribute it and/or modify | 5 | * GNUnet is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published | 6 | * it under the terms of the GNU General Public License as published |
@@ -28,6 +28,7 @@ | |||
28 | #include "gnunet_namestore_service.h" | 28 | #include "gnunet_namestore_service.h" |
29 | #include "gnunet_gnsrecord_lib.h" | 29 | #include "gnunet_gnsrecord_lib.h" |
30 | #include "gnunet_postgres_lib.h" | 30 | #include "gnunet_postgres_lib.h" |
31 | #include "gnunet_pq_lib.h" | ||
31 | #include "namestore.h" | 32 | #include "namestore.h" |
32 | 33 | ||
33 | 34 | ||
@@ -241,6 +242,7 @@ namestore_postgres_store_records (void *cls, | |||
241 | } | 242 | } |
242 | { | 243 | { |
243 | char data[data_size]; | 244 | char data[data_size]; |
245 | // FIXME: use libgnunetpq! | ||
244 | const char *paramValues[] = { | 246 | const char *paramValues[] = { |
245 | (const char *) zone_key, | 247 | (const char *) zone_key, |
246 | (const char *) &pkey, | 248 | (const char *) &pkey, |