diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-24 14:48:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-24 14:48:36 +0000 |
commit | b479dddcac56ec8352b8730470ed6cdaf4b929c5 (patch) | |
tree | 9cf9d1832a0d02c6b6734f384fcdca7959e77972 /src/set | |
parent | 389e0afa4cabf4c9ed980ef7021beca067a53498 (diff) | |
download | gnunet-b479dddcac56ec8352b8730470ed6cdaf4b929c5.tar.gz gnunet-b479dddcac56ec8352b8730470ed6cdaf4b929c5.zip |
-remove trailing whitespace
Diffstat (limited to 'src/set')
-rw-r--r-- | src/set/gnunet-service-set.c | 2 | ||||
-rw-r--r-- | src/set/gnunet-service-set_intersection.c | 22 | ||||
-rw-r--r-- | src/set/set_api.c | 2 | ||||
-rw-r--r-- | src/set/set_protocol.h | 14 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 9cc2e56f6..b5aa659be 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -517,7 +517,7 @@ incoming_suggest (struct Operation *incoming, struct Listener *listener) | |||
517 | { | 517 | { |
518 | struct GNUNET_MQ_Envelope *mqm; | 518 | struct GNUNET_MQ_Envelope *mqm; |
519 | struct GNUNET_SET_RequestMessage *cmsg; | 519 | struct GNUNET_SET_RequestMessage *cmsg; |
520 | 520 | ||
521 | GNUNET_assert (GNUNET_YES == incoming->is_incoming); | 521 | GNUNET_assert (GNUNET_YES == incoming->is_incoming); |
522 | GNUNET_assert (NULL != incoming->state); | 522 | GNUNET_assert (NULL != incoming->state); |
523 | GNUNET_assert (NULL != incoming->spec); | 523 | GNUNET_assert (NULL != incoming->spec); |
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c index 1bfda430a..a28938e04 100644 --- a/src/set/gnunet-service-set_intersection.c +++ b/src/set/gnunet-service-set_intersection.c | |||
@@ -93,12 +93,12 @@ struct OperationState | |||
93 | * size of the bloomfilter | 93 | * size of the bloomfilter |
94 | */ | 94 | */ |
95 | uint32_t bf_data_size; | 95 | uint32_t bf_data_size; |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * size of the bloomfilter | 98 | * size of the bloomfilter |
99 | */ | 99 | */ |
100 | uint32_t bf_bits_per_element; | 100 | uint32_t bf_bits_per_element; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Current state of the operation. | 103 | * Current state of the operation. |
104 | */ | 104 | */ |
@@ -445,7 +445,7 @@ send_bloomfilter (struct Operation *op) | |||
445 | struct GNUNET_CONTAINER_BloomFilter * local_bf; | 445 | struct GNUNET_CONTAINER_BloomFilter * local_bf; |
446 | 446 | ||
447 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending bf of size %u\n"); | 447 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "sending bf of size %u\n"); |
448 | 448 | ||
449 | CALCULATE_BF_SIZE(op->state->my_element_count, | 449 | CALCULATE_BF_SIZE(op->state->my_element_count, |
450 | op->spec->remote_element_count, | 450 | op->spec->remote_element_count, |
451 | bf_size, | 451 | bf_size, |
@@ -586,7 +586,7 @@ static void | |||
586 | process_bf (struct Operation *op){ | 586 | process_bf (struct Operation *op){ |
587 | uint32_t old_elements; | 587 | uint32_t old_elements; |
588 | uint32_t peer_elements; | 588 | uint32_t peer_elements; |
589 | 589 | ||
590 | old_elements = op->state->my_element_count; | 590 | old_elements = op->state->my_element_count; |
591 | peer_elements = op->spec->remote_element_count; | 591 | peer_elements = op->spec->remote_element_count; |
592 | switch (op->state->phase) | 592 | switch (op->state->phase) |
@@ -650,18 +650,18 @@ handle_p2p_bf_part (void *cls, const struct GNUNET_MessageHeader *mh) | |||
650 | const struct BFPart *msg = (const struct BFPart *) mh; | 650 | const struct BFPart *msg = (const struct BFPart *) mh; |
651 | uint32_t chunk_size; | 651 | uint32_t chunk_size; |
652 | uint32_t chunk_offset; | 652 | uint32_t chunk_offset; |
653 | 653 | ||
654 | chunk_size = ntohl(msg->chunk_length); | 654 | chunk_size = ntohl(msg->chunk_length); |
655 | chunk_offset = ntohl(msg->chunk_offset); | 655 | chunk_offset = ntohl(msg->chunk_offset); |
656 | 656 | ||
657 | if ((NULL == op->state->bf_data) | 657 | if ((NULL == op->state->bf_data) |
658 | || (op->state->bf_data_size < chunk_size + chunk_offset)){ | 658 | || (op->state->bf_data_size < chunk_size + chunk_offset)){ |
659 | // unexpected multipart chunk | 659 | // unexpected multipart chunk |
660 | GNUNET_break_op (0); | 660 | GNUNET_break_op (0); |
661 | fail_intersection_operation(op); | 661 | fail_intersection_operation(op); |
662 | return; | 662 | return; |
663 | } | 663 | } |
664 | 664 | ||
665 | memcpy (&op->state->bf_data[chunk_offset], (const char*) &msg[1], chunk_size); | 665 | memcpy (&op->state->bf_data[chunk_offset], (const char*) &msg[1], chunk_size); |
666 | 666 | ||
667 | if (op->state->bf_data_size != chunk_offset + chunk_size) | 667 | if (op->state->bf_data_size != chunk_offset + chunk_size) |
@@ -671,10 +671,10 @@ handle_p2p_bf_part (void *cls, const struct GNUNET_MessageHeader *mh) | |||
671 | op->state->remote_bf = GNUNET_CONTAINER_bloomfilter_init ((const char*) &msg[1], | 671 | op->state->remote_bf = GNUNET_CONTAINER_bloomfilter_init ((const char*) &msg[1], |
672 | op->state->bf_data_size, | 672 | op->state->bf_data_size, |
673 | op->state->bf_bits_per_element); | 673 | op->state->bf_bits_per_element); |
674 | 674 | ||
675 | GNUNET_free (op->state->bf_data); | 675 | GNUNET_free (op->state->bf_data); |
676 | op->state->bf_data = NULL; | 676 | op->state->bf_data = NULL; |
677 | 677 | ||
678 | process_bf (op); | 678 | process_bf (op); |
679 | } | 679 | } |
680 | 680 | ||
@@ -750,7 +750,7 @@ handle_p2p_element_info (void *cls, const struct GNUNET_MessageHeader *mh) | |||
750 | 750 | ||
751 | op->state->phase = PHASE_BF_EXCHANGE; | 751 | op->state->phase = PHASE_BF_EXCHANGE; |
752 | op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES); | 752 | op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES); |
753 | 753 | ||
754 | GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements, | 754 | GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements, |
755 | &iterator_initialization, | 755 | &iterator_initialization, |
756 | op); | 756 | op); |
diff --git a/src/set/set_api.c b/src/set/set_api.c index 908fa1a1d..951ac2b5b 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -428,7 +428,7 @@ set_operation_cancel (struct GNUNET_SET_OperationHandle *oh) | |||
428 | } | 428 | } |
429 | 429 | ||
430 | GNUNET_free (oh); | 430 | GNUNET_free (oh); |
431 | 431 | ||
432 | return ret; | 432 | return ret; |
433 | } | 433 | } |
434 | 434 | ||
diff --git a/src/set/set_protocol.h b/src/set/set_protocol.h index b48809a3c..9ed9c57d7 100644 --- a/src/set/set_protocol.h +++ b/src/set/set_protocol.h | |||
@@ -53,7 +53,7 @@ struct OperationRequestMessage | |||
53 | * For Intersection: my element count | 53 | * For Intersection: my element count |
54 | */ | 54 | */ |
55 | uint32_t element_count; | 55 | uint32_t element_count; |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Application-specific identifier of the request. | 58 | * Application-specific identifier of the request. |
59 | */ | 59 | */ |
@@ -104,7 +104,7 @@ struct BFMessage | |||
104 | * mutator used with this bloomfilter. | 104 | * mutator used with this bloomfilter. |
105 | */ | 105 | */ |
106 | uint32_t sender_element_count GNUNET_PACKED; | 106 | uint32_t sender_element_count GNUNET_PACKED; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * mutator used with this bloomfilter. | 109 | * mutator used with this bloomfilter. |
110 | */ | 110 | */ |
@@ -114,17 +114,17 @@ struct BFMessage | |||
114 | * Length of the bloomfilter data | 114 | * Length of the bloomfilter data |
115 | */ | 115 | */ |
116 | uint32_t bloomfilter_total_length GNUNET_PACKED; | 116 | uint32_t bloomfilter_total_length GNUNET_PACKED; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Length of the appended bloomfilter data block | 119 | * Length of the appended bloomfilter data block |
120 | */ | 120 | */ |
121 | uint32_t bloomfilter_length GNUNET_PACKED; | 121 | uint32_t bloomfilter_length GNUNET_PACKED; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Length of the bloomfilter data | 124 | * Length of the bloomfilter data |
125 | */ | 125 | */ |
126 | uint32_t bits_per_element GNUNET_PACKED; | 126 | uint32_t bits_per_element GNUNET_PACKED; |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * rest: the sender's bloomfilter | 129 | * rest: the sender's bloomfilter |
130 | */ | 130 | */ |
@@ -141,12 +141,12 @@ struct BFPart | |||
141 | * Length of the appended bloomfilter data block | 141 | * Length of the appended bloomfilter data block |
142 | */ | 142 | */ |
143 | uint32_t chunk_length GNUNET_PACKED; | 143 | uint32_t chunk_length GNUNET_PACKED; |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * offset in the bloolfilter data block, if multipart message | 146 | * offset in the bloolfilter data block, if multipart message |
147 | */ | 147 | */ |
148 | uint32_t chunk_offset GNUNET_PACKED; | 148 | uint32_t chunk_offset GNUNET_PACKED; |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * rest: the sender's bloomfilter | 151 | * rest: the sender's bloomfilter |
152 | */ | 152 | */ |