aboutsummaryrefslogtreecommitdiff
path: root/src/chat/test_chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/test_chat.c')
-rw-r--r--src/chat/test_chat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/chat/test_chat.c b/src/chat/test_chat.c
index 2e8272def..370cb04ee 100644
--- a/src/chat/test_chat.c
+++ b/src/chat/test_chat.c
@@ -58,7 +58,7 @@ struct Wanted
58{ 58{
59 struct GNUNET_CONTAINER_MetaData *meta; 59 struct GNUNET_CONTAINER_MetaData *meta;
60 60
61 GNUNET_HashCode *sender; 61 struct GNUNET_HashCode *sender;
62 62
63 char *msg; 63 char *msg;
64 64
@@ -80,9 +80,9 @@ static struct PeerContext p1;
80 80
81static struct PeerContext p2; 81static struct PeerContext p2;
82 82
83static GNUNET_HashCode alice; 83static struct GNUNET_HashCode alice;
84 84
85static GNUNET_HashCode bob; 85static struct GNUNET_HashCode bob;
86 86
87static struct GNUNET_CHAT_Room *alice_room; 87static struct GNUNET_CHAT_Room *alice_room;
88 88
@@ -201,7 +201,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
201 enum GNUNET_CHAT_MsgOptions options) 201 enum GNUNET_CHAT_MsgOptions options)
202{ 202{
203 struct Wanted *want = cls; 203 struct Wanted *want = cls;
204 GNUNET_HashCode sender; 204 struct GNUNET_HashCode sender;
205 205
206#if VERBOSE 206#if VERBOSE
207 printf ("%s - told that %s has %s\n", want->me, 207 printf ("%s - told that %s has %s\n", want->me,
@@ -213,7 +213,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
213 GNUNET_CRYPTO_hash (member_id, 213 GNUNET_CRYPTO_hash (member_id,
214 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 214 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
215 &sender); 215 &sender);
216 if ((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) && 216 if ((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) &&
217 (((member_info == NULL) && (want->meta == NULL)) || 217 (((member_info == NULL) && (want->meta == NULL)) ||
218 ((member_info != NULL) && (want->meta != NULL) && 218 ((member_info != NULL) && (want->meta != NULL) &&
219 (GNUNET_CONTAINER_meta_data_test_equal (member_info, want->meta)))) && 219 (GNUNET_CONTAINER_meta_data_test_equal (member_info, want->meta)))) &&
@@ -234,7 +234,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
234 234
235static int 235static int
236receive_cb (void *cls, struct GNUNET_CHAT_Room *room, 236receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
237 const GNUNET_HashCode * sender, 237 const struct GNUNET_HashCode * sender,
238 const struct GNUNET_CONTAINER_MetaData *meta, const char *message, 238 const struct GNUNET_CONTAINER_MetaData *meta, const char *message,
239 struct GNUNET_TIME_Absolute timestamp, 239 struct GNUNET_TIME_Absolute timestamp,
240 enum GNUNET_CHAT_MsgOptions options) 240 enum GNUNET_CHAT_MsgOptions options)
@@ -250,7 +250,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
250 if ((0 == strcmp (message, want->msg)) && 250 if ((0 == strcmp (message, want->msg)) &&
251 (((sender == NULL) && (want->sender == NULL)) || 251 (((sender == NULL) && (want->sender == NULL)) ||
252 ((sender != NULL) && (want->sender != NULL) && 252 ((sender != NULL) && (want->sender != NULL) &&
253 (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) && 253 (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) &&
254 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) && 254 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
255 (options == want->opt) && 255 (options == want->opt) &&
256 /* Not == since the library sets the actual timestamp, so it may be 256 /* Not == since the library sets the actual timestamp, so it may be
@@ -275,7 +275,7 @@ static int
275confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room, 275confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
276 uint32_t orig_seq_number, 276 uint32_t orig_seq_number,
277 struct GNUNET_TIME_Absolute timestamp, 277 struct GNUNET_TIME_Absolute timestamp,
278 const GNUNET_HashCode * receiver) 278 const struct GNUNET_HashCode * receiver)
279{ 279{
280 struct Wanted *want = cls; 280 struct Wanted *want = cls;
281 281
@@ -285,7 +285,7 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
285 EXTRACTOR_METATYPE_TITLE), 285 EXTRACTOR_METATYPE_TITLE),
286 orig_seq_number); 286 orig_seq_number);
287#endif 287#endif
288 if ((0 == memcmp (receiver, want->sender, sizeof (GNUNET_HashCode))) && 288 if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) &&
289 (orig_seq_number == want->sequence_number) && 289 (orig_seq_number == want->sequence_number) &&
290 (timestamp.abs_value >= want->timestamp.abs_value)) 290 (timestamp.abs_value >= want->timestamp.abs_value))
291 { 291 {