diff options
Diffstat (limited to 'src/chat/test_chat_private.c')
-rw-r--r-- | src/chat/test_chat_private.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c index 8b61392ca..0aebd8f8b 100644 --- a/src/chat/test_chat_private.c +++ b/src/chat/test_chat_private.c | |||
@@ -56,7 +56,7 @@ struct Wanted | |||
56 | { | 56 | { |
57 | struct GNUNET_CONTAINER_MetaData *meta; | 57 | struct GNUNET_CONTAINER_MetaData *meta; |
58 | 58 | ||
59 | GNUNET_HashCode *sender; | 59 | struct GNUNET_HashCode *sender; |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Alternative meta/sender is used when we expect join/leave notification | 62 | * Alternative meta/sender is used when we expect join/leave notification |
@@ -64,7 +64,7 @@ struct Wanted | |||
64 | */ | 64 | */ |
65 | struct GNUNET_CONTAINER_MetaData *meta2; | 65 | struct GNUNET_CONTAINER_MetaData *meta2; |
66 | 66 | ||
67 | GNUNET_HashCode *sender2; | 67 | struct GNUNET_HashCode *sender2; |
68 | 68 | ||
69 | char *msg; | 69 | char *msg; |
70 | 70 | ||
@@ -86,11 +86,11 @@ static struct PeerContext p2; | |||
86 | 86 | ||
87 | static struct PeerContext p3; | 87 | static struct PeerContext p3; |
88 | 88 | ||
89 | static GNUNET_HashCode alice; | 89 | static struct GNUNET_HashCode alice; |
90 | 90 | ||
91 | static GNUNET_HashCode bob; | 91 | static struct GNUNET_HashCode bob; |
92 | 92 | ||
93 | static GNUNET_HashCode carol; | 93 | static struct GNUNET_HashCode carol; |
94 | 94 | ||
95 | static struct GNUNET_CHAT_Room *alice_room; | 95 | static struct GNUNET_CHAT_Room *alice_room; |
96 | 96 | ||
@@ -220,7 +220,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
220 | enum GNUNET_CHAT_MsgOptions options) | 220 | enum GNUNET_CHAT_MsgOptions options) |
221 | { | 221 | { |
222 | struct Wanted *want = cls; | 222 | struct Wanted *want = cls; |
223 | GNUNET_HashCode sender; | 223 | struct GNUNET_HashCode sender; |
224 | 224 | ||
225 | #if VERBOSE | 225 | #if VERBOSE |
226 | printf ("%s - told that %s has %s\n", want->me, | 226 | printf ("%s - told that %s has %s\n", want->me, |
@@ -233,9 +233,9 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
233 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 233 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
234 | &sender); | 234 | &sender); |
235 | /* entertain both primary and an alternative sender/meta */ | 235 | /* entertain both primary and an alternative sender/meta */ |
236 | if (((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) || | 236 | if (((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) || |
237 | ((want->sender2 != NULL) && | 237 | ((want->sender2 != NULL) && |
238 | (0 == memcmp (&sender, want->sender2, sizeof (GNUNET_HashCode))))) && | 238 | (0 == memcmp (&sender, want->sender2, sizeof (struct GNUNET_HashCode))))) && |
239 | (((member_info == NULL) && (want->meta == NULL)) || | 239 | (((member_info == NULL) && (want->meta == NULL)) || |
240 | ((member_info != NULL) && | 240 | ((member_info != NULL) && |
241 | (((want->meta != NULL) && | 241 | (((want->meta != NULL) && |
@@ -246,7 +246,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
246 | { | 246 | { |
247 | /* remember Bob's public key, we need it to send private message */ | 247 | /* remember Bob's public key, we need it to send private message */ |
248 | if (NULL == bob_public_key && | 248 | if (NULL == bob_public_key && |
249 | (0 == memcmp (&bob, want->sender, sizeof (GNUNET_HashCode)))) | 249 | (0 == memcmp (&bob, want->sender, sizeof (struct GNUNET_HashCode)))) |
250 | bob_public_key = | 250 | bob_public_key = |
251 | GNUNET_memdup (member_id, | 251 | GNUNET_memdup (member_id, |
252 | sizeof (struct | 252 | sizeof (struct |
@@ -254,7 +254,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
254 | if (want->sender2 != NULL) | 254 | if (want->sender2 != NULL) |
255 | { | 255 | { |
256 | /* flush alternative sender */ | 256 | /* flush alternative sender */ |
257 | if (0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) | 257 | if (0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) |
258 | { | 258 | { |
259 | want->sender = want->sender2; | 259 | want->sender = want->sender2; |
260 | want->meta = want->meta2; | 260 | want->meta = want->meta2; |
@@ -277,7 +277,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
277 | 277 | ||
278 | static int | 278 | static int |
279 | receive_cb (void *cls, struct GNUNET_CHAT_Room *room, | 279 | receive_cb (void *cls, struct GNUNET_CHAT_Room *room, |
280 | const GNUNET_HashCode * sender, | 280 | const struct GNUNET_HashCode * sender, |
281 | const struct GNUNET_CONTAINER_MetaData *meta, const char *message, | 281 | const struct GNUNET_CONTAINER_MetaData *meta, const char *message, |
282 | struct GNUNET_TIME_Absolute timestamp, | 282 | struct GNUNET_TIME_Absolute timestamp, |
283 | enum GNUNET_CHAT_MsgOptions options) | 283 | enum GNUNET_CHAT_MsgOptions options) |
@@ -294,7 +294,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room, | |||
294 | if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) && | 294 | if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) && |
295 | (((sender == NULL) && (want->sender == NULL)) || | 295 | (((sender == NULL) && (want->sender == NULL)) || |
296 | ((sender != NULL) && (want->sender != NULL) && | 296 | ((sender != NULL) && (want->sender != NULL) && |
297 | (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) && | 297 | (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) && |
298 | (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) && | 298 | (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) && |
299 | (options == want->opt) && | 299 | (options == want->opt) && |
300 | /* Not == since the library sets the actual timestamp, so it may be | 300 | /* Not == since the library sets the actual timestamp, so it may be |