aboutsummaryrefslogtreecommitdiff
path: root/src/identity/test_identity_defaults.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity/test_identity_defaults.c')
-rw-r--r--src/identity/test_identity_defaults.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/identity/test_identity_defaults.c b/src/identity/test_identity_defaults.c
index 2caf03a1e..ad4b91ae9 100644
--- a/src/identity/test_identity_defaults.c
+++ b/src/identity/test_identity_defaults.c
@@ -50,7 +50,7 @@ static struct GNUNET_IDENTITY_Operation *op;
50 50
51/** 51/**
52 * Handle for task for timeout termination. 52 * Handle for task for timeout termination.
53 */ 53 */
54static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 54static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
55 55
56 56
@@ -105,7 +105,7 @@ end_normally (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
105/** 105/**
106 * Finish the testcase (successfully). 106 * Finish the testcase (successfully).
107 */ 107 */
108static void 108static void
109end () 109end ()
110{ 110{
111 if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) 111 if (endbadly_task != GNUNET_SCHEDULER_NO_TASK)
@@ -149,9 +149,9 @@ get_cb (void *cls,
149 GNUNET_assert (NULL != ego); 149 GNUNET_assert (NULL != ego);
150 GNUNET_assert (NULL != identifier); 150 GNUNET_assert (NULL != identifier);
151 GNUNET_assert (0 == strcmp (identifier, "test-id")); 151 GNUNET_assert (0 == strcmp (identifier, "test-id"));
152 op = GNUNET_IDENTITY_delete (h, 152 op = GNUNET_IDENTITY_delete (h,
153 "test-id", 153 "test-id",
154 &delete_cont, 154 &delete_cont,
155 NULL); 155 NULL);
156} 156}
157 157
@@ -164,12 +164,12 @@ get_cb (void *cls,
164 * @param peer handle to access more of the peer (not used) 164 * @param peer handle to access more of the peer (not used)
165 */ 165 */
166static void 166static void
167run_get (void *cls, 167run_get (void *cls,
168 const struct GNUNET_CONFIGURATION_Handle *cfg, 168 const struct GNUNET_CONFIGURATION_Handle *cfg,
169 struct GNUNET_TESTING_Peer *peer) 169 struct GNUNET_TESTING_Peer *peer)
170{ 170{
171 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 171 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
172 &endbadly, NULL); 172 &endbadly, NULL);
173 h = GNUNET_IDENTITY_connect (cfg, NULL, NULL); 173 h = GNUNET_IDENTITY_connect (cfg, NULL, NULL);
174 GNUNET_assert (NULL != h); 174 GNUNET_assert (NULL != h);
175 op = GNUNET_IDENTITY_get (h, 175 op = GNUNET_IDENTITY_get (h,
@@ -214,10 +214,10 @@ notification_cb (void *cls,
214{ 214{
215 if (NULL == ego) 215 if (NULL == ego)
216 return; /* skip first call */ 216 return; /* skip first call */
217 op = GNUNET_IDENTITY_set (h, 217 op = GNUNET_IDENTITY_set (h,
218 "test-service", 218 "test-service",
219 ego, 219 ego,
220 &success_set_cont, 220 &success_set_cont,
221 NULL); 221 NULL);
222} 222}
223 223
@@ -231,7 +231,7 @@ notification_cb (void *cls,
231static void 231static void
232create_cb (void *cls, 232create_cb (void *cls,
233 const char *emsg) 233 const char *emsg)
234{ 234{
235 GNUNET_assert (NULL == emsg); 235 GNUNET_assert (NULL == emsg);
236 op = NULL; 236 op = NULL;
237} 237}
@@ -245,19 +245,19 @@ create_cb (void *cls,
245 * @param peer handle to access more of the peer (not used) 245 * @param peer handle to access more of the peer (not used)
246 */ 246 */
247static void 247static void
248run_set (void *cls, 248run_set (void *cls,
249 const struct GNUNET_CONFIGURATION_Handle *cfg, 249 const struct GNUNET_CONFIGURATION_Handle *cfg,
250 struct GNUNET_TESTING_Peer *peer) 250 struct GNUNET_TESTING_Peer *peer)
251{ 251{
252 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 252 endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
253 &endbadly, NULL); 253 &endbadly, NULL);
254 h = GNUNET_IDENTITY_connect (cfg, &notification_cb, NULL); 254 h = GNUNET_IDENTITY_connect (cfg, &notification_cb, NULL);
255 GNUNET_assert (NULL != h); 255 GNUNET_assert (NULL != h);
256 op = GNUNET_IDENTITY_create (h, 256 op = GNUNET_IDENTITY_create (h,
257 "test-id", 257 "test-id",
258 &create_cb, 258 &create_cb,
259 NULL); 259 NULL);
260 260
261} 261}
262 262
263 263
@@ -266,14 +266,14 @@ main (int argc, char *argv[])
266{ 266{
267 GNUNET_DISK_directory_remove ("/tmp/test-identity-service"); 267 GNUNET_DISK_directory_remove ("/tmp/test-identity-service");
268 res = 1; 268 res = 1;
269 if (0 != 269 if (0 !=
270 GNUNET_TESTING_service_run ("test-identity-defaults", 270 GNUNET_TESTING_service_run ("test-identity-defaults",
271 "identity", 271 "identity",
272 "test_identity.conf", 272 "test_identity.conf",
273 &run_set, 273 &run_set,
274 NULL)) 274 NULL))
275 return 1; 275 return 1;
276 if (0 != 276 if (0 !=
277 GNUNET_TESTING_service_run ("test-identity-defaults", 277 GNUNET_TESTING_service_run ("test-identity-defaults",
278 "identity", 278 "identity",
279 "test_identity.conf", 279 "test_identity.conf",