diff options
Diffstat (limited to 'src/identity/test_identity.c')
-rw-r--r-- | src/identity/test_identity.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/identity/test_identity.c b/src/identity/test_identity.c index 60c6c2dad..6e8408ea8 100644 --- a/src/identity/test_identity.c +++ b/src/identity/test_identity.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 | */ |
54 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 54 | static 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 | */ |
108 | static void | 108 | static void |
109 | end () | 109 | end () |
110 | { | 110 | { |
111 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) | 111 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -195,9 +195,9 @@ fail_rename_cont (void *cls, | |||
195 | const char *emsg) | 195 | const char *emsg) |
196 | { | 196 | { |
197 | GNUNET_assert (NULL != emsg); | 197 | GNUNET_assert (NULL != emsg); |
198 | op = GNUNET_IDENTITY_delete (h, | 198 | op = GNUNET_IDENTITY_delete (h, |
199 | "test", | 199 | "test", |
200 | &delete_cont, | 200 | &delete_cont, |
201 | NULL); | 201 | NULL); |
202 | end (); /* yepee */ | 202 | end (); /* yepee */ |
203 | } | 203 | } |
@@ -214,10 +214,10 @@ success_rename_cont (void *cls, | |||
214 | const char *emsg) | 214 | const char *emsg) |
215 | { | 215 | { |
216 | GNUNET_assert (NULL == emsg); | 216 | GNUNET_assert (NULL == emsg); |
217 | op = GNUNET_IDENTITY_rename (h, | 217 | op = GNUNET_IDENTITY_rename (h, |
218 | "test-id", | 218 | "test-id", |
219 | "test", | 219 | "test", |
220 | &fail_rename_cont, | 220 | &fail_rename_cont, |
221 | NULL); | 221 | NULL); |
222 | } | 222 | } |
223 | 223 | ||
@@ -231,12 +231,12 @@ success_rename_cont (void *cls, | |||
231 | static void | 231 | static void |
232 | create_cb (void *cls, | 232 | create_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 = GNUNET_IDENTITY_rename (h, | 236 | op = GNUNET_IDENTITY_rename (h, |
237 | "test-id", | 237 | "test-id", |
238 | "test", | 238 | "test", |
239 | &success_rename_cont, | 239 | &success_rename_cont, |
240 | NULL); | 240 | NULL); |
241 | } | 241 | } |
242 | 242 | ||
@@ -249,19 +249,19 @@ create_cb (void *cls, | |||
249 | * @param peer handle to access more of the peer (not used) | 249 | * @param peer handle to access more of the peer (not used) |
250 | */ | 250 | */ |
251 | static void | 251 | static void |
252 | run (void *cls, | 252 | run (void *cls, |
253 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 253 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
254 | struct GNUNET_TESTING_Peer *peer) | 254 | struct GNUNET_TESTING_Peer *peer) |
255 | { | 255 | { |
256 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 256 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
257 | &endbadly, NULL); | 257 | &endbadly, NULL); |
258 | h = GNUNET_IDENTITY_connect (cfg, ¬ification_cb, NULL); | 258 | h = GNUNET_IDENTITY_connect (cfg, ¬ification_cb, NULL); |
259 | GNUNET_assert (NULL != h); | 259 | GNUNET_assert (NULL != h); |
260 | op = GNUNET_IDENTITY_create (h, | 260 | op = GNUNET_IDENTITY_create (h, |
261 | "test-id", | 261 | "test-id", |
262 | &create_cb, | 262 | &create_cb, |
263 | NULL); | 263 | NULL); |
264 | 264 | ||
265 | } | 265 | } |
266 | 266 | ||
267 | 267 | ||
@@ -270,7 +270,7 @@ main (int argc, char *argv[]) | |||
270 | { | 270 | { |
271 | GNUNET_DISK_directory_remove ("/tmp/test-identity-service"); | 271 | GNUNET_DISK_directory_remove ("/tmp/test-identity-service"); |
272 | res = 1; | 272 | res = 1; |
273 | if (0 != | 273 | if (0 != |
274 | GNUNET_TESTING_service_run ("test-identity", | 274 | GNUNET_TESTING_service_run ("test-identity", |
275 | "identity", | 275 | "identity", |
276 | "test_identity.conf", | 276 | "test_identity.conf", |