diff options
-rw-r--r-- | src/conversation/plugin_gnsrecord_conversation.c | 13 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore.c | 16 |
2 files changed, 20 insertions, 9 deletions
diff --git a/src/conversation/plugin_gnsrecord_conversation.c b/src/conversation/plugin_gnsrecord_conversation.c index ecdcb2057..e2bcf7ec9 100644 --- a/src/conversation/plugin_gnsrecord_conversation.c +++ b/src/conversation/plugin_gnsrecord_conversation.c | |||
@@ -60,10 +60,18 @@ conversation_value_to_string (void *cls, | |||
60 | char *pkey; | 60 | char *pkey; |
61 | 61 | ||
62 | if (data_size != sizeof (struct GNUNET_CONVERSATION_PhoneRecord)) | 62 | if (data_size != sizeof (struct GNUNET_CONVERSATION_PhoneRecord)) |
63 | { | ||
64 | GNUNET_break_op (0); | ||
63 | return NULL; | 65 | return NULL; |
66 | } | ||
64 | pr = data; | 67 | pr = data; |
65 | if (0 != ntohl (pr->version)) | 68 | if (1 != ntohl (pr->version)) |
69 | { | ||
70 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
71 | _("PHONE version %u not supported\n"), | ||
72 | ntohl (pr->version)); | ||
66 | return NULL; | 73 | return NULL; |
74 | } | ||
67 | pkey = GNUNET_CRYPTO_eddsa_public_key_to_string (&pr->peer.public_key); | 75 | pkey = GNUNET_CRYPTO_eddsa_public_key_to_string (&pr->peer.public_key); |
68 | s = GNUNET_STRINGS_data_to_string_alloc (&pr->line_port, | 76 | s = GNUNET_STRINGS_data_to_string_alloc (&pr->line_port, |
69 | sizeof (struct GNUNET_HashCode)); | 77 | sizeof (struct GNUNET_HashCode)); |
@@ -101,7 +109,10 @@ conversation_string_to_value (void *cls, | |||
101 | size_t *data_size) | 109 | size_t *data_size) |
102 | { | 110 | { |
103 | if (NULL == s) | 111 | if (NULL == s) |
112 | { | ||
113 | GNUNET_break (0); | ||
104 | return GNUNET_SYSERR; | 114 | return GNUNET_SYSERR; |
115 | } | ||
105 | switch (type) | 116 | switch (type) |
106 | { | 117 | { |
107 | case GNUNET_GNSRECORD_TYPE_PHONE: | 118 | case GNUNET_GNSRECORD_TYPE_PHONE: |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 9e654cc34..8f0c14fa0 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -165,7 +165,7 @@ static uint32_t type; | |||
165 | static void *data; | 165 | static void *data; |
166 | 166 | ||
167 | /** | 167 | /** |
168 | * Number of bytes in 'data'. | 168 | * Number of bytes in #data. |
169 | */ | 169 | */ |
170 | static size_t data_size; | 170 | static size_t data_size; |
171 | 171 | ||
@@ -933,8 +933,8 @@ testservice_task (void *cls, | |||
933 | 933 | ||
934 | if (GNUNET_OK != | 934 | if (GNUNET_OK != |
935 | GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey, | 935 | GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey, |
936 | strlen (reverse_pkey), | 936 | strlen (reverse_pkey), |
937 | &pubkey)) | 937 | &pubkey)) |
938 | { | 938 | { |
939 | fprintf (stderr, | 939 | fprintf (stderr, |
940 | _("Invalid public key for reverse lookup `%s'\n"), | 940 | _("Invalid public key for reverse lookup `%s'\n"), |
@@ -1007,11 +1007,11 @@ testservice_task (void *cls, | |||
1007 | ret = 1; | 1007 | ret = 1; |
1008 | return; | 1008 | return; |
1009 | } | 1009 | } |
1010 | add_qe_uri = GNUNET_NAMESTORE_set_nick(ns, | 1010 | add_qe_uri = GNUNET_NAMESTORE_set_nick (ns, |
1011 | &zone_pkey, | 1011 | &zone_pkey, |
1012 | nickstring, | 1012 | nickstring, |
1013 | &add_continuation, | 1013 | &add_continuation, |
1014 | &add_qe_uri); | 1014 | &add_qe_uri); |
1015 | } | 1015 | } |
1016 | if (monitor) | 1016 | if (monitor) |
1017 | { | 1017 | { |