diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
commit | d9d94d0e53d26af75ec8241383d166544ebd79f3 (patch) | |
tree | 9080b73624389403a198257fe0547bb4634e64d2 /src/util/test_server_disconnect.c | |
parent | 2d792ee2e9cc0c993b8907e2c8edb0c2b8465343 (diff) | |
download | gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.tar.gz gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.zip |
converting to GNUNET_LOG_from*
Diffstat (limited to 'src/util/test_server_disconnect.c')
-rw-r--r-- | src/util/test_server_disconnect.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c index 69207f81a..e38840d92 100644 --- a/src/util/test_server_disconnect.c +++ b/src/util/test_server_disconnect.c | |||
@@ -81,13 +81,14 @@ server_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
81 | 81 | ||
82 | static void | 82 | static void |
83 | recv_cb (void *cls, struct GNUNET_SERVER_Client *client, | 83 | recv_cb (void *cls, struct GNUNET_SERVER_Client *client, |
84 | const struct GNUNET_MessageHeader *message) | 84 | const struct GNUNET_MessageHeader *message) |
85 | { | 85 | { |
86 | GNUNET_assert (ok == 2); | 86 | GNUNET_assert (ok == 2); |
87 | ok = 3; | 87 | ok = 3; |
88 | GNUNET_SERVER_client_keep (client); | 88 | GNUNET_SERVER_client_keep (client); |
89 | GNUNET_SCHEDULER_add_now (&server_disconnect, client); | 89 | GNUNET_SCHEDULER_add_now (&server_disconnect, client); |
90 | GNUNET_assert (sizeof (struct GNUNET_MessageHeader) == ntohs (message->size)); | 90 | GNUNET_assert (sizeof (struct GNUNET_MessageHeader) == |
91 | ntohs (message->size)); | ||
91 | GNUNET_assert (MY_TYPE == ntohs (message->type)); | 92 | GNUNET_assert (MY_TYPE == ntohs (message->type)); |
92 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 93 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
93 | } | 94 | } |
@@ -138,18 +139,18 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
138 | cfg = GNUNET_CONFIGURATION_create (); | 139 | cfg = GNUNET_CONFIGURATION_create (); |
139 | GNUNET_CONFIGURATION_set_value_number (cfg, "test-server", "PORT", PORT); | 140 | GNUNET_CONFIGURATION_set_value_number (cfg, "test-server", "PORT", PORT); |
140 | GNUNET_CONFIGURATION_set_value_string (cfg, "test-server", "HOSTNAME", | 141 | GNUNET_CONFIGURATION_set_value_string (cfg, "test-server", "HOSTNAME", |
141 | "localhost"); | 142 | "localhost"); |
142 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", | 143 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", |
143 | "localhost"); | 144 | "localhost"); |
144 | cc = GNUNET_CLIENT_connect ("test-server", cfg); | 145 | cc = GNUNET_CLIENT_connect ("test-server", cfg); |
145 | GNUNET_assert (cc != NULL); | 146 | GNUNET_assert (cc != NULL); |
146 | GNUNET_assert (NULL != | 147 | GNUNET_assert (NULL != |
147 | GNUNET_CLIENT_notify_transmit_ready (cc, | 148 | GNUNET_CLIENT_notify_transmit_ready (cc, |
148 | sizeof (struct | 149 | sizeof (struct |
149 | GNUNET_MessageHeader), | 150 | GNUNET_MessageHeader), |
150 | TIMEOUT, GNUNET_YES, | 151 | TIMEOUT, GNUNET_YES, |
151 | &transmit_initial_message, | 152 | &transmit_initial_message, |
152 | NULL)); | 153 | NULL)); |
153 | } | 154 | } |
154 | 155 | ||
155 | 156 | ||