aboutsummaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/pq_connect.c4
-rw-r--r--src/pq/test_pq.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 4e614526b..b06a591cf 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -294,7 +294,7 @@ GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db)
294void 294void
295GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) 295GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db)
296{ 296{
297 if (NULL != db->sc) 297 if (NULL != db->sc)
298 db->sc (db->sc_cls, 298 db->sc (db->sc_cls,
299 -1); 299 -1);
300 if (NULL != db->conn) 300 if (NULL != db->conn)
@@ -468,6 +468,8 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
468void 468void
469GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) 469GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
470{ 470{
471 if (NULL == db)
472 return;
471 GNUNET_assert (0 == 473 GNUNET_assert (0 ==
472 GNUNET_CONTAINER_multishortmap_size (db->channel_map)); 474 GNUNET_CONTAINER_multishortmap_size (db->channel_map));
473 GNUNET_CONTAINER_multishortmap_destroy (db->channel_map); 475 GNUNET_CONTAINER_multishortmap_destroy (db->channel_map);
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c
index 1df1cd126..ffbb4d129 100644
--- a/src/pq/test_pq.c
+++ b/src/pq/test_pq.c
@@ -38,7 +38,7 @@ static int ret;
38/** 38/**
39 * An event handler. 39 * An event handler.
40 */ 40 */
41static struct GNUNET_PQ_EventHandler *eh; 41static struct GNUNET_DB_EventHandler *eh;
42 42
43/** 43/**
44 * Timeout task. 44 * Timeout task.
@@ -129,7 +129,7 @@ run_queries (struct GNUNET_PQ_Context *db)
129 uint64_t u64; 129 uint64_t u64;
130 uint64_t u642; 130 uint64_t u642;
131 uint64_t uzzz = 42; 131 uint64_t uzzz = 42;
132 132
133 priv = GNUNET_CRYPTO_rsa_private_key_create (1024); 133 priv = GNUNET_CRYPTO_rsa_private_key_create (1024);
134 pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv); 134 pub = GNUNET_CRYPTO_rsa_private_key_get_public (priv);
135 memset (&hmsg, 42, sizeof(hmsg)); 135 memset (&hmsg, 42, sizeof(hmsg));
@@ -264,16 +264,16 @@ event_cb (void *cls,
264static int 264static int
265test_notify (struct GNUNET_PQ_Context *db) 265test_notify (struct GNUNET_PQ_Context *db)
266{ 266{
267 struct GNUNET_PQ_EventHeaderP e1 = { 267 struct GNUNET_DB_EventHeaderP e1 = {
268 .size = htons (sizeof (e1)), 268 .size = htons (sizeof (e1)),
269 .type = htons (1) 269 .type = htons (1)
270 }; 270 };
271 struct GNUNET_PQ_EventHeaderP e2 = { 271 struct GNUNET_DB_EventHeaderP e2 = {
272 .size = htons (sizeof (e2)), 272 .size = htons (sizeof (e2)),
273 .type = htons (2) 273 .type = htons (2)
274 }; 274 };
275 unsigned int called = 0; 275 unsigned int called = 0;
276 struct GNUNET_PQ_EventHandler *eh; 276 struct GNUNET_DB_EventHandler *eh;
277 277
278 eh = GNUNET_PQ_event_listen (db, 278 eh = GNUNET_PQ_event_listen (db,
279 &e1, 279 &e1,
@@ -359,7 +359,7 @@ event_sched_cb (void *cls,
359static void 359static void
360sched_tests (void *cls) 360sched_tests (void *cls)
361{ 361{
362 struct GNUNET_PQ_EventHeaderP es = { 362 struct GNUNET_DB_EventHeaderP es = {
363 .size = htons (sizeof (es)), 363 .size = htons (sizeof (es)),
364 .type = htons (42) 364 .type = htons (42)
365 }; 365 };
@@ -382,7 +382,7 @@ sched_tests (void *cls)
382 5); 382 5);
383} 383}
384 384
385 385
386int 386int
387main (int argc, 387main (int argc,
388 const char *const argv[]) 388 const char *const argv[])