diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-31 10:36:28 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-08-31 10:36:28 +0000 |
commit | a94a1861d123fe850d2ab5ae74cbb59b132a15ea (patch) | |
tree | a16d2518067d13f2463e83cd9dc66bdd6b733621 /src/testbed/test_testbed_api_operations.c | |
parent | d0c55c3ee57913977b1497ea0e6f20573820b206 (diff) | |
download | gnunet-a94a1861d123fe850d2ab5ae74cbb59b132a15ea.tar.gz gnunet-a94a1861d123fe850d2ab5ae74cbb59b132a15ea.zip |
adhering to indentation standard
Diffstat (limited to 'src/testbed/test_testbed_api_operations.c')
-rw-r--r-- | src/testbed/test_testbed_api_operations.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/testbed/test_testbed_api_operations.c b/src/testbed/test_testbed_api_operations.c index f72b6f0e5..eea919705 100644 --- a/src/testbed/test_testbed_api_operations.c +++ b/src/testbed/test_testbed_api_operations.c | |||
@@ -59,33 +59,32 @@ struct GNUNET_TESTBED_Operation *op2; | |||
59 | * Enumeration of test stages | 59 | * Enumeration of test stages |
60 | */ | 60 | */ |
61 | enum Test | 61 | enum Test |
62 | { | 62 | { |
63 | /** | 63 | /** |
64 | * Initial stage | 64 | * Initial stage |
65 | */ | 65 | */ |
66 | TEST_INIT, | 66 | TEST_INIT, |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * op1 has been started | 69 | * op1 has been started |
70 | */ | 70 | */ |
71 | TEST_OP1_STARTED, | 71 | TEST_OP1_STARTED, |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * op1 has been released | 74 | * op1 has been released |
75 | */ | 75 | */ |
76 | TEST_OP1_RELEASED, | 76 | TEST_OP1_RELEASED, |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * op2 has started | 79 | * op2 has started |
80 | */ | 80 | */ |
81 | TEST_OP2_STARTED, | 81 | TEST_OP2_STARTED, |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * op2 released | 84 | * op2 released |
85 | */ | 85 | */ |
86 | TEST_OP2_RELEASED | 86 | TEST_OP2_RELEASED |
87 | 87 | }; | |
88 | }; | ||
89 | 88 | ||
90 | /** | 89 | /** |
91 | * The test result | 90 | * The test result |
@@ -151,7 +150,7 @@ start_cb (void *cls) | |||
151 | * a callback to the 'OperationStart' preceeds the call to | 150 | * a callback to the 'OperationStart' preceeds the call to |
152 | * 'OperationRelease'. Implementations of this function are expected | 151 | * 'OperationRelease'. Implementations of this function are expected |
153 | * to clean up whatever state is in 'cls' and release all resources | 152 | * to clean up whatever state is in 'cls' and release all resources |
154 | * associated with the operation. | 153 | * associated with the operation. |
155 | */ | 154 | */ |
156 | static void | 155 | static void |
157 | release_cb (void *cls) | 156 | release_cb (void *cls) |
@@ -175,7 +174,7 @@ release_cb (void *cls) | |||
175 | 174 | ||
176 | 175 | ||
177 | /** | 176 | /** |
178 | * Main run function. | 177 | * Main run function. |
179 | * | 178 | * |
180 | * @param cls NULL | 179 | * @param cls NULL |
181 | * @param args arguments passed to GNUNET_PROGRAM_run | 180 | * @param args arguments passed to GNUNET_PROGRAM_run |
@@ -190,7 +189,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
190 | GNUNET_assert (NULL != q1); | 189 | GNUNET_assert (NULL != q1); |
191 | q2 = GNUNET_TESTBED_operation_queue_create_ (2); | 190 | q2 = GNUNET_TESTBED_operation_queue_create_ (2); |
192 | GNUNET_assert (NULL != q2); | 191 | GNUNET_assert (NULL != q2); |
193 | op1 = GNUNET_TESTBED_operation_create_ (&op1, start_cb, release_cb); | 192 | op1 = GNUNET_TESTBED_operation_create_ (&op1, start_cb, release_cb); |
194 | GNUNET_assert (NULL != op1); | 193 | GNUNET_assert (NULL != op1); |
195 | op2 = GNUNET_TESTBED_operation_create_ (&op2, start_cb, release_cb); | 194 | op2 = GNUNET_TESTBED_operation_create_ (&op2, start_cb, release_cb); |
196 | GNUNET_TESTBED_operation_queue_insert_ (q1, op1); | 195 | GNUNET_TESTBED_operation_queue_insert_ (q1, op1); |
@@ -203,17 +202,19 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
203 | /** | 202 | /** |
204 | * Main function | 203 | * Main function |
205 | */ | 204 | */ |
206 | int main (int argc, char **argv) | 205 | int |
206 | main (int argc, char **argv) | ||
207 | { | 207 | { |
208 | int ret; | 208 | int ret; |
209 | char *const argv2[] = | 209 | char *const argv2[] = |
210 | {"test_testbed_api_operations", "-c", "test_testbed_api.conf", NULL}; | 210 | { "test_testbed_api_operations", "-c", "test_testbed_api.conf", NULL }; |
211 | struct GNUNET_GETOPT_CommandLineOption options[] = | 211 | struct GNUNET_GETOPT_CommandLineOption options[] = |
212 | {GNUNET_GETOPT_OPTION_END}; | 212 | { GNUNET_GETOPT_OPTION_END }; |
213 | 213 | ||
214 | ret = GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, | 214 | ret = |
215 | "test_testbed_api_operations", "nohelp", options, | 215 | GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, |
216 | &run, NULL); | 216 | "test_testbed_api_operations", "nohelp", options, |
217 | &run, NULL); | ||
217 | if ((GNUNET_OK != ret) || (TEST_OP2_RELEASED != result)) | 218 | if ((GNUNET_OK != ret) || (TEST_OP2_RELEASED != result)) |
218 | return 1; | 219 | return 1; |
219 | op1 = NULL; | 220 | op1 = NULL; |