-fixing build issues in pt/exit/vpn related to #3047
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 Sep 2013 22:10:54 +0000 (22:10 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 Sep 2013 22:10:54 +0000 (22:10 +0000)
src/dns/plugin_block_dns.c
src/exit/gnunet-daemon-exit.c
src/include/block_dns.h
src/pt/gnunet-daemon-pt.c

index c0009dd6883a56c66aed39647a5053dae845f1c9..de9185a5ab8ade4ed0bf7eac0ffab8e0a7da4a2c 100644 (file)
@@ -93,7 +93,7 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
         GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD,
                                  &ad->purpose, 
                                  &ad->signature, 
-                                 &ad->peer))
+                                 &ad->peer.public_key))
     {
       GNUNET_break_op (0);
       return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
index 6f6e713621e386bb2ab6a1efbcf848e5847d244e..a758162a7e24677f6cf4b7bf75241752a02143b0 100644 (file)
@@ -3574,7 +3574,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
     dht = GNUNET_DHT_connect (cfg, 1);
     peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg);
     GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key,
-                                                   &dns_advertisement.peer);
+                                                   &dns_advertisement.peer.public_key);
     dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) - 
                                            sizeof (struct GNUNET_CRYPTO_EccSignature));
     dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD);
index 928a9512639e9c6026c9a9059bcfe8f5fdf83fe6..650b3bc140c98c37b067395246a7e160fdd78552 100644 (file)
@@ -53,7 +53,7 @@ struct GNUNET_DNS_Advertisement
   /**
    * The peer providing this service
    */
-  struct GNUNET_CRYPTO_EccPublicSignKey peer;
+  struct GNUNET_PeerIdentity peer;
 
 };
 GNUNET_NETWORK_STRUCT_END
index eee851fafb1559d14a15f91b647bd343d536bbb1..1d9abf81ad1274ff75d7ea4159dd9c4d211d1826 100644 (file)
@@ -1193,7 +1193,6 @@ handle_dht_result (void *cls,
                   size_t size, const void *data)
 {
   const struct GNUNET_DNS_Advertisement *ad;
-  struct GNUNET_PeerIdentity pid;
   struct MeshExit *exit;
 
   if (sizeof (struct GNUNET_DNS_Advertisement) != size)
@@ -1202,18 +1201,15 @@ handle_dht_result (void *cls,
     return;
   }
   ad = data;
-  GNUNET_CRYPTO_hash (&ad->peer,
-                     sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
-                     &pid.hashPubKey);
   for (exit = exit_head; NULL != exit; exit = exit->next)  
-    if (0 == memcmp (&pid,
+    if (0 == memcmp (&ad->peer,
                     &exit->peer,
                     sizeof (struct GNUNET_PeerIdentity)))
       break;
   if (NULL == exit)
   {
     exit = GNUNET_new (struct MeshExit);
-    exit->peer = pid;
+    exit->peer = ad->peer;
     /* tunnel is closed, so insert at the end */
     GNUNET_CONTAINER_DLL_insert_tail (exit_head,
                                      exit_tail,