diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-27 04:15:09 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-27 04:15:09 +0100 |
commit | 2d92ec0f27dbefef916e94f5d272a2ff72091c54 (patch) | |
tree | 87be0a4d48b049cfd197cb59d6693ab5192ac7e4 | |
parent | 5abac271a452d04a5fbea2e4333a9606d435cf94 (diff) | |
download | gnunet-2d92ec0f27dbefef916e94f5d272a2ff72091c54.tar.gz gnunet-2d92ec0f27dbefef916e94f5d272a2ff72091c54.zip |
fix type error and test cases
-rw-r--r-- | src/set/gnunet-service-set_union.c | 7 | ||||
-rw-r--r-- | src/set/set_api.c | 2 | ||||
-rw-r--r-- | src/set/test_set_api.c | 1 | ||||
-rw-r--r-- | src/set/test_set_intersection_result_full.c | 1 | ||||
-rw-r--r-- | src/set/test_set_union_result_symmetric.c | 1 |
5 files changed, 10 insertions, 2 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index 4283ba88c..6b0520374 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -781,7 +781,8 @@ send_element_iterator (void *cls, | |||
781 | { | 781 | { |
782 | struct Operation *op = cls; | 782 | struct Operation *op = cls; |
783 | struct GNUNET_SET_ElementMessage *emsg; | 783 | struct GNUNET_SET_ElementMessage *emsg; |
784 | struct GNUNET_SET_Element *el = value; | 784 | struct ElementEntry *ee = value; |
785 | struct GNUNET_SET_Element *el = &ee->element; | ||
785 | struct GNUNET_MQ_Envelope *ev; | 786 | struct GNUNET_MQ_Envelope *ev; |
786 | 787 | ||
787 | ev = GNUNET_MQ_msg_extra (emsg, el->size, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_ELEMENT); | 788 | ev = GNUNET_MQ_msg_extra (emsg, el->size, GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_ELEMENT); |
@@ -1553,7 +1554,9 @@ handle_p2p_full_element (void *cls, | |||
1553 | } | 1554 | } |
1554 | } | 1555 | } |
1555 | 1556 | ||
1556 | if (op->state->received_total > 8 && op->state->received_fresh < op->state->received_total / 3) | 1557 | if ( (GNUNET_YES == op->spec->byzantine) && |
1558 | (op->state->received_total > 8) && | ||
1559 | (op->state->received_fresh < op->state->received_total / 3) ) | ||
1557 | { | 1560 | { |
1558 | /* The other peer gave us lots of old elements, there's something wrong. */ | 1561 | /* The other peer gave us lots of old elements, there's something wrong. */ |
1559 | GNUNET_break_op (0); | 1562 | GNUNET_break_op (0); |
diff --git a/src/set/set_api.c b/src/set/set_api.c index 0ae02e35a..5b5b1b8ee 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -657,6 +657,8 @@ GNUNET_SET_add_element (struct GNUNET_SET_Handle *set, | |||
657 | struct GNUNET_MQ_Envelope *mqm; | 657 | struct GNUNET_MQ_Envelope *mqm; |
658 | struct GNUNET_SET_ElementMessage *msg; | 658 | struct GNUNET_SET_ElementMessage *msg; |
659 | 659 | ||
660 | LOG (GNUNET_ERROR_TYPE_INFO, "adding element of type %u\n", (unsigned) element->element_type); | ||
661 | |||
660 | if (GNUNET_YES == set->invalid) | 662 | if (GNUNET_YES == set->invalid) |
661 | { | 663 | { |
662 | if (NULL != cont) | 664 | if (NULL != cont) |
diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c index 63c881077..dd3f004f2 100644 --- a/src/set/test_set_api.c +++ b/src/set/test_set_api.c | |||
@@ -102,6 +102,7 @@ result_cb_set1 (void *cls, | |||
102 | static void | 102 | static void |
103 | result_cb_set2 (void *cls, | 103 | result_cb_set2 (void *cls, |
104 | const struct GNUNET_SET_Element *element, | 104 | const struct GNUNET_SET_Element *element, |
105 | uint64_t size, | ||
105 | enum GNUNET_SET_Status status) | 106 | enum GNUNET_SET_Status status) |
106 | { | 107 | { |
107 | switch (status) | 108 | switch (status) |
diff --git a/src/set/test_set_intersection_result_full.c b/src/set/test_set_intersection_result_full.c index be9d63646..a36aae4d5 100644 --- a/src/set/test_set_intersection_result_full.c +++ b/src/set/test_set_intersection_result_full.c | |||
@@ -90,6 +90,7 @@ result_cb_set1 (void *cls, | |||
90 | static void | 90 | static void |
91 | result_cb_set2 (void *cls, | 91 | result_cb_set2 (void *cls, |
92 | const struct GNUNET_SET_Element *element, | 92 | const struct GNUNET_SET_Element *element, |
93 | uint64_t current_size, | ||
93 | enum GNUNET_SET_Status status) | 94 | enum GNUNET_SET_Status status) |
94 | { | 95 | { |
95 | static int count; | 96 | static int count; |
diff --git a/src/set/test_set_union_result_symmetric.c b/src/set/test_set_union_result_symmetric.c index 88739fcaf..f81c7b8f7 100644 --- a/src/set/test_set_union_result_symmetric.c +++ b/src/set/test_set_union_result_symmetric.c | |||
@@ -126,6 +126,7 @@ result_cb_set1 (void *cls, | |||
126 | static void | 126 | static void |
127 | result_cb_set2 (void *cls, | 127 | result_cb_set2 (void *cls, |
128 | const struct GNUNET_SET_Element *element, | 128 | const struct GNUNET_SET_Element *element, |
129 | uint64_t current_size, | ||
129 | enum GNUNET_SET_Status status) | 130 | enum GNUNET_SET_Status status) |
130 | { | 131 | { |
131 | switch (status) | 132 | switch (status) |