diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-09-22 01:47:36 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-09-22 01:47:36 +0000 |
commit | 68e2709a38f9c481f96024138a6f9ae57a280a57 (patch) | |
tree | 92fa0952ea1e9c3387194bc54aa06c819a8d2270 /src/set | |
parent | afc7d17dc798216e89506fb4e66aabb7e0f0077b (diff) | |
download | gnunet-68e2709a38f9c481f96024138a6f9ae57a280a57.tar.gz gnunet-68e2709a38f9c481f96024138a6f9ae57a280a57.zip |
set api changes
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/gnunet-service-set_union.c | 9 | ||||
-rw-r--r-- | src/set/gnunet-set-profiler.c | 4 | ||||
-rw-r--r-- | src/set/set_api.c | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index 5975ef19f..5b452cae1 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -1003,7 +1003,12 @@ send_client_element (struct Operation *op, | |||
1003 | GNUNET_break (0); | 1003 | GNUNET_break (0); |
1004 | return; | 1004 | return; |
1005 | } | 1005 | } |
1006 | rm->result_status = htons (GNUNET_SET_STATUS_OK); | 1006 | |
1007 | if (GNUNET_SET_RESULT_ADDED == op->spec->result_mode) | ||
1008 | rm->result_status = htons (GNUNET_SET_STATUS_OK); | ||
1009 | else if (GNUNET_SET_RESULT_SYMMETRIC == op->spec->result_mode) | ||
1010 | rm->result_status = htons (GNUNET_SET_STATUS_ADD_LOCAL); | ||
1011 | |||
1007 | rm->request_id = htonl (op->spec->client_request_id); | 1012 | rm->request_id = htonl (op->spec->client_request_id); |
1008 | rm->element_type = element->element_type; | 1013 | rm->element_type = element->element_type; |
1009 | memcpy (&rm[1], element->data, element->size); | 1014 | memcpy (&rm[1], element->data, element->size); |
@@ -1167,7 +1172,7 @@ handle_p2p_elements (void *cls, | |||
1167 | 1172 | ||
1168 | op_register_element (op, ee); | 1173 | op_register_element (op, ee); |
1169 | /* only send results immediately if the client wants it */ | 1174 | /* only send results immediately if the client wants it */ |
1170 | if (GNUNET_SET_RESULT_ADDED == op->spec->result_mode) | 1175 | if (GNUNET_SET_RESULT_FULL != op->spec->result_mode) |
1171 | send_client_element (op, &ee->element); | 1176 | send_client_element (op, &ee->element); |
1172 | } | 1177 | } |
1173 | 1178 | ||
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index 286cc6fb3..1569c29b7 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c | |||
@@ -150,7 +150,7 @@ set_listen_cb (void *cls, | |||
150 | GNUNET_assert (NULL == info2.oh); | 150 | GNUNET_assert (NULL == info2.oh); |
151 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 151 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
152 | "set listen cb called\n"); | 152 | "set listen cb called\n"); |
153 | info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_ADDED, | 153 | info2.oh = GNUNET_SET_accept (request, GNUNET_SET_RESULT_SYMMETRIC, |
154 | set_result_cb, &info2); | 154 | set_result_cb, &info2); |
155 | GNUNET_SET_commit (info2.oh, info2.set); | 155 | GNUNET_SET_commit (info2.oh, info2.set); |
156 | } | 156 | } |
@@ -273,7 +273,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
273 | &app_id, set_listen_cb, NULL); | 273 | &app_id, set_listen_cb, NULL); |
274 | 274 | ||
275 | info1.oh = GNUNET_SET_prepare (&local_peer, &app_id, NULL, | 275 | info1.oh = GNUNET_SET_prepare (&local_peer, &app_id, NULL, |
276 | GNUNET_SET_RESULT_ADDED, | 276 | GNUNET_SET_RESULT_SYMMETRIC, |
277 | set_result_cb, &info1); | 277 | set_result_cb, &info1); |
278 | GNUNET_SET_commit (info1.oh, info1.set); | 278 | GNUNET_SET_commit (info1.oh, info1.set); |
279 | GNUNET_SET_destroy (info1.set); | 279 | GNUNET_SET_destroy (info1.set); |
diff --git a/src/set/set_api.c b/src/set/set_api.c index 920571a01..51a494d7f 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -417,6 +417,8 @@ handle_result (void *cls, | |||
417 | switch (result_status) | 417 | switch (result_status) |
418 | { | 418 | { |
419 | case GNUNET_SET_STATUS_OK: | 419 | case GNUNET_SET_STATUS_OK: |
420 | case GNUNET_SET_STATUS_ADD_LOCAL: | ||
421 | case GNUNET_SET_STATUS_ADD_REMOTE: | ||
420 | break; | 422 | break; |
421 | case GNUNET_SET_STATUS_FAILURE: | 423 | case GNUNET_SET_STATUS_FAILURE: |
422 | oh->result_cb = NULL; | 424 | oh->result_cb = NULL; |