diff options
Diffstat (limited to 'src/conversation/plugin_gnsrecord_conversation.c')
-rw-r--r-- | src/conversation/plugin_gnsrecord_conversation.c | 13 |
1 files changed, 12 insertions, 1 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: |