diff options
Diffstat (limited to 'src/credential/plugin_gnsrecord_credential.c')
-rw-r--r-- | src/credential/plugin_gnsrecord_credential.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/credential/plugin_gnsrecord_credential.c b/src/credential/plugin_gnsrecord_credential.c index ffb2857dc..72f174fca 100644 --- a/src/credential/plugin_gnsrecord_credential.c +++ b/src/credential/plugin_gnsrecord_credential.c | |||
@@ -2,20 +2,18 @@ | |||
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2013 GNUnet e.V. | 3 | Copyright (C) 2013 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | it under the terms of the GNU General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation; either version 3, or (at your | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 17 | */ |
20 | 18 | ||
21 | /** | 19 | /** |
@@ -62,9 +60,9 @@ credential_value_to_string (void *cls, | |||
62 | int i; | 60 | int i; |
63 | if (data_size < sizeof (struct GNUNET_CREDENTIAL_DelegationRecord)) | 61 | if (data_size < sizeof (struct GNUNET_CREDENTIAL_DelegationRecord)) |
64 | return NULL; /* malformed */ | 62 | return NULL; /* malformed */ |
65 | memcpy (&sets, | 63 | GNUNET_memcpy (&sets, |
66 | data, | 64 | data, |
67 | sizeof (sets)); | 65 | sizeof (sets)); |
68 | cdata = data; | 66 | cdata = data; |
69 | struct GNUNET_CREDENTIAL_DelegationSet set[ntohl(sets.set_count)]; | 67 | struct GNUNET_CREDENTIAL_DelegationSet set[ntohl(sets.set_count)]; |
70 | if (GNUNET_OK != GNUNET_CREDENTIAL_delegation_set_deserialize (GNUNET_ntohll (sets.data_size), | 68 | if (GNUNET_OK != GNUNET_CREDENTIAL_delegation_set_deserialize (GNUNET_ntohll (sets.data_size), |
@@ -224,7 +222,7 @@ credential_string_to_value (void *cls, | |||
224 | } | 222 | } |
225 | tmp_data_size = GNUNET_CREDENTIAL_delegation_set_get_size (entries, | 223 | tmp_data_size = GNUNET_CREDENTIAL_delegation_set_get_size (entries, |
226 | set); | 224 | set); |
227 | 225 | ||
228 | if (-1 == tmp_data_size) | 226 | if (-1 == tmp_data_size) |
229 | { | 227 | { |
230 | GNUNET_free (tmp_str); | 228 | GNUNET_free (tmp_str); |
@@ -248,7 +246,7 @@ credential_string_to_value (void *cls, | |||
248 | return GNUNET_OK; | 246 | return GNUNET_OK; |
249 | } | 247 | } |
250 | case GNUNET_GNSRECORD_TYPE_CREDENTIAL: | 248 | case GNUNET_GNSRECORD_TYPE_CREDENTIAL: |
251 | { | 249 | { |
252 | struct GNUNET_CREDENTIAL_Credential *cred; | 250 | struct GNUNET_CREDENTIAL_Credential *cred; |
253 | cred = GNUNET_CREDENTIAL_credential_from_string (s); | 251 | cred = GNUNET_CREDENTIAL_credential_from_string (s); |
254 | 252 | ||