aboutsummaryrefslogtreecommitdiff
path: root/src/testbed
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-07-31 07:57:48 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-07-31 07:57:48 +0000
commite8e09d1eab1492ee4676aadbfb047386c3ccd466 (patch)
tree1df7942b0290425d52366ca0229604de3771f26a /src/testbed
parentd8e53a1c1b4df4ed7e85447174bbfe7e7657f5d3 (diff)
downloadgnunet-e8e09d1eab1492ee4676aadbfb047386c3ccd466.tar.gz
gnunet-e8e09d1eab1492ee4676aadbfb047386c3ccd466.zip
-removed operation type
Diffstat (limited to 'src/testbed')
-rw-r--r--src/testbed/test_testbed_api_operations.c11
-rw-r--r--src/testbed/testbed_api_operations.c15
-rw-r--r--src/testbed/testbed_api_operations.h43
3 files changed, 4 insertions, 65 deletions
diff --git a/src/testbed/test_testbed_api_operations.c b/src/testbed/test_testbed_api_operations.c
index e14cb36b0..f72b6f0e5 100644
--- a/src/testbed/test_testbed_api_operations.c
+++ b/src/testbed/test_testbed_api_operations.c
@@ -190,16 +190,9 @@ run (void *cls, char *const *args, const char *cfgfile,
190 GNUNET_assert (NULL != q1); 190 GNUNET_assert (NULL != q1);
191 q2 = GNUNET_TESTBED_operation_queue_create_ (2); 191 q2 = GNUNET_TESTBED_operation_queue_create_ (2);
192 GNUNET_assert (NULL != q2); 192 GNUNET_assert (NULL != q2);
193 op1 = GNUNET_TESTBED_operation_create_ (&op1, 193 op1 = GNUNET_TESTBED_operation_create_ (&op1, start_cb, release_cb);
194 start_cb,
195 release_cb,
196 OP_PEER_CREATE);
197
198 GNUNET_assert (NULL != op1); 194 GNUNET_assert (NULL != op1);
199 op2 = GNUNET_TESTBED_operation_create_ (&op2, 195 op2 = GNUNET_TESTBED_operation_create_ (&op2, start_cb, release_cb);
200 start_cb,
201 release_cb,
202 OP_PEER_CREATE);
203 GNUNET_TESTBED_operation_queue_insert_ (q1, op1); 196 GNUNET_TESTBED_operation_queue_insert_ (q1, op1);
204 GNUNET_TESTBED_operation_queue_insert_ (q2, op1); 197 GNUNET_TESTBED_operation_queue_insert_ (q2, op1);
205 GNUNET_TESTBED_operation_queue_insert_ (q1, op2); 198 GNUNET_TESTBED_operation_queue_insert_ (q1, op2);
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c
index 72cb8465e..5758e2aa9 100644
--- a/src/testbed/testbed_api_operations.c
+++ b/src/testbed/testbed_api_operations.c
@@ -116,11 +116,6 @@ struct GNUNET_TESTBED_Operation
116 struct OperationQueue **queues; 116 struct OperationQueue **queues;
117 117
118 /** 118 /**
119 * The Operation ID
120 */
121 uint64_t id;
122
123 /**
124 * The id of the task which calls OperationStart for this operation 119 * The id of the task which calls OperationStart for this operation
125 */ 120 */
126 GNUNET_SCHEDULER_TaskIdentifier start_task_id; 121 GNUNET_SCHEDULER_TaskIdentifier start_task_id;
@@ -135,11 +130,6 @@ struct GNUNET_TESTBED_Operation
135 */ 130 */
136 enum OperationState state; 131 enum OperationState state;
137 132
138 /**
139 * The type of the operation
140 */
141 enum OperationType type;
142
143}; 133};
144 134
145 135
@@ -193,14 +183,12 @@ check_readiness (struct GNUNET_TESTBED_Operation *op)
193 * @param cls closure for the callbacks 183 * @param cls closure for the callbacks
194 * @param start function to call to start the operation 184 * @param start function to call to start the operation
195 * @param release function to call to close down the operation 185 * @param release function to call to close down the operation
196 * @param type the type of the operation
197 * @return handle to the operation 186 * @return handle to the operation
198 */ 187 */
199struct GNUNET_TESTBED_Operation * 188struct GNUNET_TESTBED_Operation *
200GNUNET_TESTBED_operation_create_ (void *cls, 189GNUNET_TESTBED_operation_create_ (void *cls,
201 OperationStart start, 190 OperationStart start,
202 OperationRelease release, 191 OperationRelease release)
203 enum OperationType type)
204{ 192{
205 struct GNUNET_TESTBED_Operation *op; 193 struct GNUNET_TESTBED_Operation *op;
206 194
@@ -208,7 +196,6 @@ GNUNET_TESTBED_operation_create_ (void *cls,
208 op->start = start; 196 op->start = start;
209 op->release = release; 197 op->release = release;
210 op->cb_cls = cls; 198 op->cb_cls = cls;
211 op->type = type;
212 return op; 199 return op;
213} 200}
214 201
diff --git a/src/testbed/testbed_api_operations.h b/src/testbed/testbed_api_operations.h
index 92f5644c9..08d6df2c0 100644
--- a/src/testbed/testbed_api_operations.h
+++ b/src/testbed/testbed_api_operations.h
@@ -38,44 +38,6 @@ struct OperationQueue;
38 38
39 39
40/** 40/**
41 * Enumeration of operation types
42 */
43enum OperationType
44 {
45 /**
46 * Peer create operation
47 */
48 OP_PEER_CREATE,
49
50 /**
51 * Peer start operation
52 */
53 OP_PEER_START,
54
55 /**
56 * Peer stop operation
57 */
58 OP_PEER_STOP,
59
60 /**
61 * Peer destroy operation
62 */
63 OP_PEER_DESTROY,
64
65 /**
66 * Get peer information operation
67 */
68 OP_PEER_INFO,
69
70 /**
71 * Overlay connection operation
72 */
73 OP_OVERLAY_CONNECT,
74
75 };
76
77
78/**
79 * Create an operation queue. 41 * Create an operation queue.
80 * 42 *
81 * @param max_active maximum number of operations in this 43 * @param max_active maximum number of operations in this
@@ -160,15 +122,12 @@ typedef void (*OperationRelease)(void *cls);
160 * @param cls closure for the callbacks 122 * @param cls closure for the callbacks
161 * @param start function to call to start the operation 123 * @param start function to call to start the operation
162 * @param release function to call to close down the operation 124 * @param release function to call to close down the operation
163 * @param type the type of the operation
164 * @param data operation's relavant data
165 * @return handle to the operation 125 * @return handle to the operation
166 */ 126 */
167struct GNUNET_TESTBED_Operation * 127struct GNUNET_TESTBED_Operation *
168GNUNET_TESTBED_operation_create_ (void *cls, 128GNUNET_TESTBED_operation_create_ (void *cls,
169 OperationStart start, 129 OperationStart start,
170 OperationRelease release, 130 OperationRelease release);
171 enum OperationType type);
172 131
173 132
174/** 133/**