aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-01-13 19:47:51 +0000
committerBart Polot <bart@net.in.tum.de>2014-01-13 19:47:51 +0000
commita37183bb1f137d8a0457fc9c2428219e337cd6a7 (patch)
tree97487ef7ba9294aaff19885ffb9d42ac687b4570 /src
parentbcc04f0a5babd8283ff50c5dd13e0afccdb2e5f4 (diff)
downloadgnunet-a37183bb1f137d8a0457fc9c2428219e337cd6a7.tar.gz
gnunet-a37183bb1f137d8a0457fc9c2428219e337cd6a7.zip
- fix compilation
Diffstat (limited to 'src')
-rw-r--r--src/hello/address.c28
-rw-r--r--src/include/gnunet_hello_lib.h5
2 files changed, 15 insertions, 18 deletions
diff --git a/src/hello/address.c b/src/hello/address.c
index 67ad8a060..ae839155c 100644
--- a/src/hello/address.c
+++ b/src/hello/address.c
@@ -29,6 +29,20 @@
29 29
30 30
31/** 31/**
32 * Get the size of an address struct.
33 *
34 * @param address address
35 * @return the size
36 */
37size_t
38GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address * address)
39{
40 return sizeof (struct GNUNET_HELLO_Address) + address->address_length +
41 strlen (address->transport_name) + 1;
42}
43
44
45/**
32 * Allocate an address struct. 46 * Allocate an address struct.
33 * 47 *
34 * @param peer the peer 48 * @param peer the peer
@@ -64,20 +78,6 @@ GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
64 78
65 79
66/** 80/**
67 * Get the size of an address struct.
68 *
69 * @param address address
70 * @return the size
71 */
72size_t
73GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address * address)
74{
75 return sizeof (struct GNUNET_HELLO_Address) + address->address_length +
76 strlen (address->transport_name) + 1;
77}
78
79
80/**
81 * Copy an address struct. 81 * Copy an address struct.
82 * 82 *
83 * @param address address to copy 83 * @param address address to copy
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index a6b9ccb72..cdf286f3b 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -114,7 +114,6 @@ struct GNUNET_HELLO_Address
114 114
115}; 115};
116 116
117
118/** 117/**
119 * Allocate an address struct. 118 * Allocate an address struct.
120 * 119 *
@@ -122,14 +121,12 @@ struct GNUNET_HELLO_Address
122 * @param transport_name plugin name 121 * @param transport_name plugin name
123 * @param address binary address 122 * @param address binary address
124 * @param address_length number of bytes in 'address' 123 * @param address_length number of bytes in 'address'
125 * @param local_info additional address information, will not get serialized
126 * @return the address struct 124 * @return the address struct
127 */ 125 */
128struct GNUNET_HELLO_Address * 126struct GNUNET_HELLO_Address *
129GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, 127GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
130 const char *transport_name, const void *address, 128 const char *transport_name, const void *address,
131 size_t address_length, 129 size_t address_length);
132 enum GNUNET_HELLO_AddressInfo local_info);
133 130
134 131
135/** 132/**