diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-23 15:15:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-23 17:47:38 +0100 |
commit | d5af1252b2a83d75fe4a8f6e48e1d01ab027b553 (patch) | |
tree | 3138f19a619c8b1730aafd6b31f041e64a4f2622 /src/set | |
parent | 0581ec4f88a81894a17ef4619a8ac2a0c3c7d061 (diff) | |
download | gnunet-d5af1252b2a83d75fe4a8f6e48e1d01ab027b553.tar.gz gnunet-d5af1252b2a83d75fe4a8f6e48e1d01ab027b553.zip |
add set operation options
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/gnunet-set-profiler.c | 4 | ||||
-rw-r--r-- | src/set/set_api.c | 2 | ||||
-rw-r--r-- | src/set/test_set_api.c | 3 | ||||
-rw-r--r-- | src/set/test_set_intersection_result_full.c | 2 | ||||
-rw-r--r-- | src/set/test_set_union_result_symmetric.c | 2 |
5 files changed, 12 insertions, 1 deletions
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index f89817ff5..22a9d85cf 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c | |||
@@ -225,7 +225,8 @@ set_listen_cb (void *cls, | |||
225 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 225 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
226 | "set listen cb called\n"); | 226 | "set listen cb called\n"); |
227 | info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_SYMMETRIC, | 227 | info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_SYMMETRIC, |
228 | set_result_cb, &info2); | 228 | (struct GNUNET_SET_Option[]) { 0 }, |
229 | set_result_cb, &info2); | ||
229 | GNUNET_SET_commit (info2.oh, info2.set); | 230 | GNUNET_SET_commit (info2.oh, info2.set); |
230 | } | 231 | } |
231 | 232 | ||
@@ -352,6 +353,7 @@ run (void *cls, | |||
352 | 353 | ||
353 | info1.oh = GNUNET_SET_prepare (&local_peer, &app_id, NULL, | 354 | info1.oh = GNUNET_SET_prepare (&local_peer, &app_id, NULL, |
354 | GNUNET_SET_RESULT_SYMMETRIC, | 355 | GNUNET_SET_RESULT_SYMMETRIC, |
356 | (struct GNUNET_SET_Option[]) { 0 }, | ||
355 | set_result_cb, &info1); | 357 | set_result_cb, &info1); |
356 | GNUNET_SET_commit (info1.oh, info1.set); | 358 | GNUNET_SET_commit (info1.oh, info1.set); |
357 | GNUNET_SET_destroy (info1.set); | 359 | GNUNET_SET_destroy (info1.set); |
diff --git a/src/set/set_api.c b/src/set/set_api.c index baeee6da0..c2e2cd1e9 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -766,6 +766,7 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, | |||
766 | const struct GNUNET_HashCode *app_id, | 766 | const struct GNUNET_HashCode *app_id, |
767 | const struct GNUNET_MessageHeader *context_msg, | 767 | const struct GNUNET_MessageHeader *context_msg, |
768 | enum GNUNET_SET_ResultMode result_mode, | 768 | enum GNUNET_SET_ResultMode result_mode, |
769 | struct GNUNET_SET_Option options[], | ||
769 | GNUNET_SET_ResultIterator result_cb, | 770 | GNUNET_SET_ResultIterator result_cb, |
770 | void *result_cls) | 771 | void *result_cls) |
771 | { | 772 | { |
@@ -1006,6 +1007,7 @@ GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh) | |||
1006 | struct GNUNET_SET_OperationHandle * | 1007 | struct GNUNET_SET_OperationHandle * |
1007 | GNUNET_SET_accept (struct GNUNET_SET_Request *request, | 1008 | GNUNET_SET_accept (struct GNUNET_SET_Request *request, |
1008 | enum GNUNET_SET_ResultMode result_mode, | 1009 | enum GNUNET_SET_ResultMode result_mode, |
1010 | struct GNUNET_SET_Option options[], | ||
1009 | GNUNET_SET_ResultIterator result_cb, | 1011 | GNUNET_SET_ResultIterator result_cb, |
1010 | void *result_cls) | 1012 | void *result_cls) |
1011 | { | 1013 | { |
diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c index 21af45f8a..4bc6bd1c3 100644 --- a/src/set/test_set_api.c +++ b/src/set/test_set_api.c | |||
@@ -149,6 +149,7 @@ listen_cb (void *cls, | |||
149 | listen_handle = NULL; | 149 | listen_handle = NULL; |
150 | oh2 = GNUNET_SET_accept (request, | 150 | oh2 = GNUNET_SET_accept (request, |
151 | GNUNET_SET_RESULT_ADDED, | 151 | GNUNET_SET_RESULT_ADDED, |
152 | (struct GNUNET_SET_Option[]) { 0 }, | ||
152 | &result_cb_set2, | 153 | &result_cb_set2, |
153 | NULL); | 154 | NULL); |
154 | GNUNET_SET_commit (oh2, | 155 | GNUNET_SET_commit (oh2, |
@@ -179,6 +180,7 @@ start (void *cls) | |||
179 | &app_id, | 180 | &app_id, |
180 | &context_msg, | 181 | &context_msg, |
181 | GNUNET_SET_RESULT_ADDED, | 182 | GNUNET_SET_RESULT_ADDED, |
183 | (struct GNUNET_SET_Option[]) { 0 }, | ||
182 | &result_cb_set1, | 184 | &result_cb_set1, |
183 | NULL); | 185 | NULL); |
184 | GNUNET_SET_commit (oh1, | 186 | GNUNET_SET_commit (oh1, |
@@ -378,6 +380,7 @@ run (void *cls, | |||
378 | &app_id, | 380 | &app_id, |
379 | NULL, | 381 | NULL, |
380 | GNUNET_SET_RESULT_ADDED, | 382 | GNUNET_SET_RESULT_ADDED, |
383 | (struct GNUNET_SET_Option[]) { 0 }, | ||
381 | NULL, | 384 | NULL, |
382 | NULL); | 385 | NULL); |
383 | 386 | ||
diff --git a/src/set/test_set_intersection_result_full.c b/src/set/test_set_intersection_result_full.c index b2d6ce8a9..cbe1ce149 100644 --- a/src/set/test_set_intersection_result_full.c +++ b/src/set/test_set_intersection_result_full.c | |||
@@ -133,6 +133,7 @@ listen_cb (void *cls, | |||
133 | listen_handle = NULL; | 133 | listen_handle = NULL; |
134 | oh2 = GNUNET_SET_accept (request, | 134 | oh2 = GNUNET_SET_accept (request, |
135 | GNUNET_SET_RESULT_FULL, | 135 | GNUNET_SET_RESULT_FULL, |
136 | (struct GNUNET_SET_Option[]) { 0 }, | ||
136 | &result_cb_set2, | 137 | &result_cb_set2, |
137 | NULL); | 138 | NULL); |
138 | GNUNET_SET_commit (oh2, | 139 | GNUNET_SET_commit (oh2, |
@@ -163,6 +164,7 @@ start (void *cls) | |||
163 | &app_id, | 164 | &app_id, |
164 | &context_msg, | 165 | &context_msg, |
165 | GNUNET_SET_RESULT_FULL, | 166 | GNUNET_SET_RESULT_FULL, |
167 | (struct GNUNET_SET_Option[]) { 0 }, | ||
166 | &result_cb_set1, | 168 | &result_cb_set1, |
167 | NULL); | 169 | NULL); |
168 | GNUNET_SET_commit (oh1, | 170 | GNUNET_SET_commit (oh1, |
diff --git a/src/set/test_set_union_result_symmetric.c b/src/set/test_set_union_result_symmetric.c index ab191a34a..8dff40ec0 100644 --- a/src/set/test_set_union_result_symmetric.c +++ b/src/set/test_set_union_result_symmetric.c | |||
@@ -184,6 +184,7 @@ listen_cb (void *cls, | |||
184 | listen_handle = NULL; | 184 | listen_handle = NULL; |
185 | oh2 = GNUNET_SET_accept (request, | 185 | oh2 = GNUNET_SET_accept (request, |
186 | GNUNET_SET_RESULT_SYMMETRIC, | 186 | GNUNET_SET_RESULT_SYMMETRIC, |
187 | (struct GNUNET_SET_Option[]) { 0 }, | ||
187 | &result_cb_set2, | 188 | &result_cb_set2, |
188 | NULL); | 189 | NULL); |
189 | GNUNET_SET_commit (oh2, | 190 | GNUNET_SET_commit (oh2, |
@@ -212,6 +213,7 @@ start (void *cls) | |||
212 | &app_id, | 213 | &app_id, |
213 | &context_msg, | 214 | &context_msg, |
214 | GNUNET_SET_RESULT_SYMMETRIC, | 215 | GNUNET_SET_RESULT_SYMMETRIC, |
216 | (struct GNUNET_SET_Option[]) { 0 }, | ||
215 | &result_cb_set1, NULL); | 217 | &result_cb_set1, NULL); |
216 | GNUNET_SET_commit (oh1, set1); | 218 | GNUNET_SET_commit (oh1, set1); |
217 | } | 219 | } |