- dont resend useless channel_destroy messages
[oweals/gnunet.git] / src / set / test_set_api.c
index 3dd49f03695e0e4542fed27dfe0df8cd22b924bc..ec5226d50aee42a41cc37dfc05447f115c2cedcd 100644 (file)
@@ -136,9 +136,10 @@ init_set2 (void *cls)
 {
   struct GNUNET_SET_Element element;
 
-
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "initializing set 2\n");
 
+  element.type = 0;
+
   element.data = "hello";
   element.size = strlen(element.data);
   GNUNET_SET_add_element (set2, &element, NULL, NULL);
@@ -159,6 +160,8 @@ init_set1 (void)
 {
   struct GNUNET_SET_Element element;
 
+  element.type = 0;
+
   element.data = "hello";
   element.size = strlen(element.data);
   GNUNET_SET_add_element (set1, &element, NULL, NULL);
@@ -194,6 +197,8 @@ test_iter ()
 
   iter_set = GNUNET_SET_create (config, GNUNET_SET_OPERATION_UNION);
 
+  element.type = 0;
+
   element.data = "hello";
   element.size = strlen(element.data);
   GNUNET_SET_add_element (iter_set, &element, NULL, NULL);
@@ -211,7 +216,7 @@ test_iter ()
 /**
  * Signature of the 'main' function for a (single-peer) testcase that
  * is run using 'GNUNET_TESTING_peer_run'.
- * 
+ *
  * @param cls closure
  * @param cfg configuration of the peer that was started
  * @param peer identity of the peer that was created
@@ -225,10 +230,10 @@ run (void *cls,
   struct GNUNET_SET_OperationHandle *my_oh;
 
   config = cfg;
-  GNUNET_CRYPTO_get_host_identity (cfg, &local_id);
-  printf ("my id (from CRYPTO): %s\n", GNUNET_h2s (&local_id.hashPubKey));
+  GNUNET_CRYPTO_get_peer_identity (cfg, &local_id);
+  printf ("my id (from CRYPTO): %s\n", GNUNET_i2s (&local_id));
   GNUNET_TESTING_peer_get_identity (peer, &local_id);
-  printf ("my id (from TESTING): %s\n", GNUNET_h2s (&local_id.hashPubKey));
+  printf ("my id (from TESTING): %s\n", GNUNET_i2s (&local_id));
 
   test_iter ();