aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-06 16:52:39 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-06 16:52:39 +0200
commit079beb884ac4236f993736c664660c3892560c9b (patch)
tree44697c4f22dc0ec92c56da4c3e05c1d87ce6b608 /src/include
parent6ab14a20690a499ad32e3f2ad448d64d4e6b65fc (diff)
downloadgnunet-079beb884ac4236f993736c664660c3892560c9b.tar.gz
gnunet-079beb884ac4236f993736c664660c3892560c9b.zip
-fix serialization
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_reclaim_lib.h11
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
68GNUNET_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
78GNUNET_NETWORK_STRUCT_END
79
77static const struct GNUNET_RECLAIM_Identifier GNUNET_RECLAIM_ID_ZERO; 80static 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 */
367struct GNUNET_RECLAIM_Attribute * 371ssize_t
368GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size); 372GNUNET_RECLAIM_attribute_deserialize (const char *data, size_t data_size,
373 struct GNUNET_RECLAIM_Attribute **attr);
369 374
370 375
371/** 376/**