-ensure external symbols have proper prefix for conversation service
[oweals/gnunet.git] / src / gns / gnunet-dns2gns.c
index 4b5c66e576d174670fe6d5a4cfaa42e415da2787..a6d57f3a96b6ce40869ac03894461da00cd5c54e 100644 (file)
@@ -143,7 +143,7 @@ static unsigned int listen_port = 53;
 /**
  * Which GNS zone do we translate incoming DNS requests to?
  */
-static struct GNUNET_CRYPTO_EccPublicKey my_zone;
+static struct GNUNET_CRYPTO_EccPublicSignKey my_zone;
 
 /**
  * '-z' option with the main zone to use.
@@ -166,7 +166,6 @@ static struct GNUNET_IDENTITY_Handle *identity;
 static struct GNUNET_IDENTITY_Operation *id_op;
 
 
-
 /**
  * Task run on shutdown.  Cleans up everything.
  *
@@ -191,6 +190,16 @@ do_shutdown (void *cls,
     GNUNET_NETWORK_socket_close (listen_socket6);
     listen_socket6 = NULL;
   }
+  if (NULL != id_op)
+  {
+    GNUNET_IDENTITY_cancel (id_op);
+    id_op = NULL;
+  }
+  if (NULL != identity)
+  {
+    GNUNET_IDENTITY_disconnect (identity);
+    identity = NULL;
+  }
   GNUNET_GNS_disconnect (gns);
   gns = NULL;
   GNUNET_DNSSTUB_stop (dns_stub);
@@ -315,7 +324,7 @@ result_processor (void *cls,
        case GNUNET_DNSPARSER_TYPE_A:
          GNUNET_assert (sizeof (struct in_addr) == rd[i].data_size);
          rec.name = GNUNET_strdup (packet->queries[0].name);
-         rec.class = GNUNET_TUN_DNS_CLASS_INTERNET;
+         rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET;
          rec.type = GNUNET_DNSPARSER_TYPE_A;
          rec.data.raw.data = GNUNET_new (struct in_addr);
          memcpy (rec.data.raw.data,
@@ -330,7 +339,7 @@ result_processor (void *cls,
          GNUNET_assert (sizeof (struct in6_addr) == rd[i].data_size);
          rec.name = GNUNET_strdup (packet->queries[0].name);
          rec.data.raw.data = GNUNET_malloc (sizeof (struct in6_addr));
-         rec.class = GNUNET_TUN_DNS_CLASS_INTERNET;
+         rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET;
          rec.type = GNUNET_DNSPARSER_TYPE_AAAA;
          memcpy (rec.data.raw.data,
                  rd[i].data,
@@ -343,7 +352,7 @@ result_processor (void *cls,
        case GNUNET_DNSPARSER_TYPE_CNAME:
          rec.name = GNUNET_strdup (packet->queries[0].name);
          rec.data.hostname = strdup (rd[i].data);
-         rec.class = GNUNET_TUN_DNS_CLASS_INTERNET;
+         rec.dns_traffic_class = GNUNET_TUN_DNS_CLASS_INTERNET;
          rec.type = GNUNET_DNSPARSER_TYPE_CNAME;
          memcpy (rec.data.hostname,
                  rd[i].data,
@@ -734,7 +743,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     }
   if ( (NULL == gns_zone_str) ||
        (GNUNET_OK !=
-       GNUNET_CRYPTO_ecc_public_key_from_string (gns_zone_str,
+       GNUNET_CRYPTO_ecc_public_sign_key_from_string (gns_zone_str,
                                                  strlen (gns_zone_str),
                                                  &my_zone)) )
   {