diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 16:52:39 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 16:52:39 +0200 |
commit | 079beb884ac4236f993736c664660c3892560c9b (patch) | |
tree | 44697c4f22dc0ec92c56da4c3e05c1d87ce6b608 /src/include/gnunet_reclaim_lib.h | |
parent | 6ab14a20690a499ad32e3f2ad448d64d4e6b65fc (diff) | |
download | gnunet-079beb884ac4236f993736c664660c3892560c9b.tar.gz gnunet-079beb884ac4236f993736c664660c3892560c9b.zip |
-fix serialization
Diffstat (limited to 'src/include/gnunet_reclaim_lib.h')
-rw-r--r-- | src/include/gnunet_reclaim_lib.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/include/gnunet_reclaim_lib.h b/src/include/gnunet_reclaim_lib.h index 4f2d6dba5..7d521ffa8 100644 --- a/src/include/gnunet_reclaim_lib.h +++ b/src/include/gnunet_reclaim_lib.h | |||
@@ -65,6 +65,7 @@ extern "C" { | |||
65 | */ | 65 | */ |
66 | #define GNUNET_RECLAIM_ID_LENGTH (256 / 8) | 66 | #define GNUNET_RECLAIM_ID_LENGTH (256 / 8) |
67 | 67 | ||
68 | GNUNET_NETWORK_STRUCT_BEGIN | ||
68 | /** | 69 | /** |
69 | * A reclaim identifier | 70 | * A reclaim identifier |
70 | * FIXME maybe put this in a different namespace | 71 | * FIXME maybe put this in a different namespace |
@@ -74,6 +75,8 @@ struct GNUNET_RECLAIM_Identifier | |||
74 | char id[GNUNET_RECLAIM_ID_LENGTH]; | 75 | char id[GNUNET_RECLAIM_ID_LENGTH]; |
75 | }; | 76 | }; |
76 | 77 | ||
78 | GNUNET_NETWORK_STRUCT_END | ||
79 | |||
77 | static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO; | 80 | static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO; |
78 | 81 | ||
79 | #define GNUNET_RECLAIM_id_is_equal(a,b) ((0 == \ | 82 | #define GNUNET_RECLAIM_id_is_equal(a,b) ((0 == \ |
@@ -361,11 +364,13 @@ GNUNET_RECLAIM_attribute_serialize (const struct GNUNET_RECLAIM_Attribute *attr, | |||
361 | * | 364 | * |
362 | * @param data the serialized attribute | 365 | * @param data the serialized attribute |
363 | * @param data_size the length of the serialized data | 366 | * @param data_size the length of the serialized data |
367 | * @param attr deserialized attribute. Will be allocated. Must be free'd | ||
364 | * | 368 | * |
365 | * @return a GNUNET_IDENTITY_PROVIDER_Attribute, must be free'd by caller | 369 | * @return number of bytes read or -1 for error |
366 | */ | 370 | */ |
367 | struct GNUNET_RECLAIM_Attribute * | 371 | ssize_t |
368 | GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size); | 372 | GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size, |
373 | struct GNUNET_RECLAIM_Attribute **attr); | ||
369 | 374 | ||
370 | 375 | ||
371 | /** | 376 | /** |