diff options
Diffstat (limited to 'src/util/test_mq_client.c')
-rw-r--r-- | src/util/test_mq_client.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/util/test_mq_client.c b/src/util/test_mq_client.c index b7eb1516a..30e498fcc 100644 --- a/src/util/test_mq_client.c +++ b/src/util/test_mq_client.c | |||
@@ -60,6 +60,9 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
60 | return; | 60 | return; |
61 | } | 61 | } |
62 | 62 | ||
63 | /* can happen if notify does not work */ | ||
64 | GNUNET_assert (received < 2); | ||
65 | |||
63 | GNUNET_SERVER_receive_done (argclient, GNUNET_YES); | 66 | GNUNET_SERVER_receive_done (argclient, GNUNET_YES); |
64 | } | 67 | } |
65 | 68 | ||
@@ -98,14 +101,16 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = { | |||
98 | 101 | ||
99 | void send_cb (void *cls) | 102 | void send_cb (void *cls) |
100 | { | 103 | { |
104 | /* the notify should only be called once */ | ||
105 | GNUNET_assert (GNUNET_NO == notify); | ||
101 | printf ("notify sent\n"); | 106 | printf ("notify sent\n"); |
102 | notify = GNUNET_YES; | 107 | notify = GNUNET_YES; |
103 | } | 108 | } |
104 | 109 | ||
105 | void test_mq (struct GNUNET_CLIENT_Connection *client) | 110 | void test_mq (struct GNUNET_CLIENT_Connection *client) |
106 | { | 111 | { |
107 | struct GNUNET_MQ_MessageQueue *mq; | 112 | struct GNUNET_MQ_Handle *mq; |
108 | struct GNUNET_MQ_Message *mqm; | 113 | struct GNUNET_MQ_Envelope *mqm; |
109 | 114 | ||
110 | /* FIXME: test handling responses */ | 115 | /* FIXME: test handling responses */ |
111 | mq = GNUNET_MQ_queue_for_connection_client (client, NULL, NULL); | 116 | mq = GNUNET_MQ_queue_for_connection_client (client, NULL, NULL); |