diff options
Diffstat (limited to 'src/testing/testing_api_cmd_system_destroy.c')
-rw-r--r-- | src/testing/testing_api_cmd_system_destroy.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/testing/testing_api_cmd_system_destroy.c b/src/testing/testing_api_cmd_system_destroy.c index 5ed0c2fd2..338123d91 100644 --- a/src/testing/testing_api_cmd_system_destroy.c +++ b/src/testing/testing_api_cmd_system_destroy.c | |||
@@ -46,17 +46,18 @@ struct TestSystemState | |||
46 | */ | 46 | */ |
47 | static void | 47 | static void |
48 | system_destroy_run (void *cls, | 48 | system_destroy_run (void *cls, |
49 | const struct GNUNET_TESTING_Command *cmd, | ||
50 | struct GNUNET_TESTING_Interpreter *is) | 49 | struct GNUNET_TESTING_Interpreter *is) |
51 | { | 50 | { |
52 | struct TestSystemState *tss = cls; | 51 | struct TestSystemState *tss = cls; |
53 | const struct GNUNET_TESTING_Command *system_cmd; | 52 | const struct GNUNET_TESTING_Command *system_cmd; |
54 | struct GNUNET_TESTING_System *tl_system; | 53 | struct GNUNET_TESTING_System *tl_system; |
55 | 54 | ||
56 | system_cmd = GNUNET_TESTING_interpreter_lookup_command (tss->create_label); | 55 | system_cmd = GNUNET_TESTING_interpreter_lookup_command (is, |
56 | tss->create_label); | ||
57 | GNUNET_TESTING_get_trait_test_system (system_cmd, | 57 | GNUNET_TESTING_get_trait_test_system (system_cmd, |
58 | &tl_system); | 58 | &tl_system); |
59 | GNUNET_TESTING_system_destroy (tl_system, GNUNET_YES); | 59 | GNUNET_TESTING_system_destroy (tl_system, |
60 | GNUNET_YES); | ||
60 | } | 61 | } |
61 | 62 | ||
62 | 63 | ||
@@ -65,8 +66,7 @@ system_destroy_run (void *cls, | |||
65 | * | 66 | * |
66 | */ | 67 | */ |
67 | static void | 68 | static void |
68 | system_destroy_cleanup (void *cls, | 69 | system_destroy_cleanup (void *cls) |
69 | const struct GNUNET_TESTING_Command *cmd) | ||
70 | { | 70 | { |
71 | struct TestSystemState *tss = cls; | 71 | struct TestSystemState *tss = cls; |
72 | 72 | ||
@@ -78,7 +78,7 @@ system_destroy_cleanup (void *cls, | |||
78 | * Trait function of this cmd does nothing. | 78 | * Trait function of this cmd does nothing. |
79 | * | 79 | * |
80 | */ | 80 | */ |
81 | static int | 81 | static enum GNUNET_GenericReturnValue |
82 | system_destroy_traits (void *cls, | 82 | system_destroy_traits (void *cls, |
83 | const void **ret, | 83 | const void **ret, |
84 | const char *trait, | 84 | const char *trait, |
@@ -103,14 +103,15 @@ GNUNET_TESTING_cmd_system_destroy (const char *label, | |||
103 | 103 | ||
104 | tss = GNUNET_new (struct TestSystemState); | 104 | tss = GNUNET_new (struct TestSystemState); |
105 | tss->create_label = create_label; | 105 | tss->create_label = create_label; |
106 | 106 | { | |
107 | struct GNUNET_TESTING_Command cmd = { | 107 | struct GNUNET_TESTING_Command cmd = { |
108 | .cls = tss, | 108 | .cls = tss, |
109 | .label = label, | 109 | .label = label, |
110 | .run = &system_destroy_run, | 110 | .run = &system_destroy_run, |
111 | .cleanup = &system_destroy_cleanup, | 111 | .cleanup = &system_destroy_cleanup, |
112 | .traits = &system_destroy_traits | 112 | .traits = &system_destroy_traits |
113 | }; | 113 | }; |
114 | 114 | ||
115 | return cmd; | 115 | return cmd; |
116 | } | ||
116 | } | 117 | } |