plugin datastore mysql
[oweals/gnunet.git] / src / psycstore / test_plugin_psycstore.c
index 0a7824929e74dc38e47286bab71ee18a9f6bc07a..fc5e1f6b6e2d0a3a616c2c995b792e319e5dc851 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of GNUnet
- * Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+ * Copyright (C) 2013 GNUnet e.V.
  *
  * GNUnet is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published
  * Boston, MA 02110-1301, USA.
  */
 
-/*
- * @file psycstore/test_plugin_psycstore.c
- * @brief Test for the PSYCstore plugins.
+/**
  * @author Gabor X Toth
  * @author Christian Grothoff
+ *
+ * @file
+ * Test for the PSYCstore plugins.
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
@@ -141,7 +142,7 @@ struct StateClosure {
 };
 
 static int
-state_cb (void *cls, const char *name, const void *value, size_t value_size)
+state_cb (void *cls, const char *name, const void *value, uint32_t value_size)
 {
   struct StateClosure *scls = cls;
   const void *val = scls->value[scls->n];
@@ -285,7 +286,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   GNUNET_assert (
     GNUNET_OK == db->message_get (db->cls, &channel_pub_key,
-                                  message_id, message_id,
+                                  message_id, message_id, 0,
                                   &ret_frags, fragment_cb, &fcls));
   GNUNET_assert (fcls.n == 2 && ret_frags == 2);
 
@@ -309,12 +310,12 @@ run (void *cls, char *const *args, const char *cfgfile,
                                                       message_id, 0));
 
   GNUNET_assert (GNUNET_OK == db->state_modify_op (db->cls, &channel_pub_key,
-                                                   GNUNET_ENV_OP_ASSIGN,
+                                                   GNUNET_PSYC_OP_ASSIGN,
                                                    "_foo",
                                                    C2ARG("one two three")));
 
   GNUNET_assert (GNUNET_OK == db->state_modify_op (db->cls, &channel_pub_key,
-                                                   GNUNET_ENV_OP_ASSIGN,
+                                                   GNUNET_PSYC_OP_ASSIGN,
                                                    "_foo_bar", slave_key,
                                                    sizeof (*slave_key)));
 
@@ -401,7 +402,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                                       message_id - max_state_msg_id));
 
   GNUNET_assert (GNUNET_OK == db->state_modify_op (db->cls, &channel_pub_key,
-                                                   GNUNET_ENV_OP_ASSIGN,
+                                                   GNUNET_PSYC_OP_ASSIGN,
                                                    "_sync_foo",
                                                    C2ARG("five six seven")));