aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Cabral <bcabral@uw.edu>2014-03-30 13:42:47 +0000
committerBruno Cabral <bcabral@uw.edu>2014-03-30 13:42:47 +0000
commitc20cf66237cb0e1b608427fd95ce95a13f6ebeb4 (patch)
treebd3405f558c74b2df19722c2ba0679b0d20c3f4a
parente63b1859b1c284193b8a12221001d48069079b2c (diff)
downloadgnunet-c20cf66237cb0e1b608427fd95ce95a13f6ebeb4.tar.gz
gnunet-c20cf66237cb0e1b608427fd95ce95a13f6ebeb4.zip
friend is a reserved work in C++. Rename to friend_id.
-rw-r--r--src/include/gnunet_friends_lib.h8
-rw-r--r--src/topology/friends.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/include/gnunet_friends_lib.h b/src/include/gnunet_friends_lib.h
index dda1d3245..a60787654 100644
--- a/src/include/gnunet_friends_lib.h
+++ b/src/include/gnunet_friends_lib.h
@@ -33,10 +33,10 @@
33 * Signature of a function called on each friend found. 33 * Signature of a function called on each friend found.
34 * 34 *
35 * @param cls closure 35 * @param cls closure
36 * @param friend peer identity of the friend 36 * @param friend_id peer identity of the friend
37 */ 37 */
38typedef void (*GNUNET_FRIENDS_Callback)(void *cls, 38typedef void (*GNUNET_FRIENDS_Callback)(void *cls,
39 const struct GNUNET_PeerIdentity *friend); 39 const struct GNUNET_PeerIdentity *friend_id);
40 40
41 41
42/** 42/**
@@ -84,12 +84,12 @@ GNUNET_FRIENDS_write_stop (struct GNUNET_FRIENDS_Writer *w);
84 * Add a friend to the friends file. 84 * Add a friend to the friends file.
85 * 85 *
86 * @param w write handle 86 * @param w write handle
87 * @param friend friend to add 87 * @param friend_id friend to add
88 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 88 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
89 */ 89 */
90int 90int
91GNUNET_FRIENDS_write (struct GNUNET_FRIENDS_Writer *w, 91GNUNET_FRIENDS_write (struct GNUNET_FRIENDS_Writer *w,
92 const struct GNUNET_PeerIdentity *friend); 92 const struct GNUNET_PeerIdentity *friend_id);
93 93
94 94
95#endif 95#endif
diff --git a/src/topology/friends.c b/src/topology/friends.c
index f79ee77ca..348123fe6 100644
--- a/src/topology/friends.c
+++ b/src/topology/friends.c
@@ -194,18 +194,18 @@ GNUNET_FRIENDS_write_stop (struct GNUNET_FRIENDS_Writer *w)
194 * Add a friend to the friends file. 194 * Add a friend to the friends file.
195 * 195 *
196 * @param w write handle 196 * @param w write handle
197 * @param friend friend to add 197 * @param friend_id friend to add
198 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 198 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
199 */ 199 */
200int 200int
201GNUNET_FRIENDS_write (struct GNUNET_FRIENDS_Writer *w, 201GNUNET_FRIENDS_write (struct GNUNET_FRIENDS_Writer *w,
202 const struct GNUNET_PeerIdentity *friend) 202 const struct GNUNET_PeerIdentity *friend_id)
203{ 203{
204 char *buf; 204 char *buf;
205 char *ret; 205 char *ret;
206 size_t slen; 206 size_t slen;
207 207
208 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&friend->public_key); 208 ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&friend_id->public_key);
209 GNUNET_asprintf (&buf, 209 GNUNET_asprintf (&buf,
210 "%s\n", 210 "%s\n",
211 ret); 211 ret);