-skeletons for transport-ng
[oweals/gnunet.git] / src / gnsrecord / plugin_gnsrecord_dns.c
index 532d35d5dd7f1b51628cc635d8e8e457e2151c36..aa64f0dd65fc506aac8fb4dd78a77241e9e22334 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     Copyright (C) 2013, 2014 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013, 2014 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
@@ -265,7 +265,7 @@ dns_value_to_string (void *cls,
  * @return the value, 0 if not found
  */
 static unsigned int
-rfc4394_mnemonic_to_value (const char *mnemonic)
+rfc4398_mnemonic_to_value (const char *mnemonic)
 {
   static struct {
     const char *mnemonic;
@@ -425,7 +425,7 @@ dns_string_to_value (void *cls,
       sdup = GNUNET_strdup (s);
       typep = strtok (sdup, " ");
       if ( (NULL == typep) ||
-           ( (0 == (type = rfc4394_mnemonic_to_value (typep))) &&
+           ( (0 == (type = rfc4398_mnemonic_to_value (typep))) &&
              ( (1 != SSCANF (typep,
                              "%u",
                              &type)) ||
@@ -444,6 +444,7 @@ dns_string_to_value (void *cls,
         GNUNET_free (sdup);
         return GNUNET_SYSERR;
       }
+      alg = 0;
       algp = strtok (NULL, " ");
       if ( (NULL == algp) ||
            ( (0 == (type = rfc4034_mnemonic_to_value (typep))) &&