aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_intersection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-24 14:48:36 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-24 14:48:36 +0000
commitb479dddcac56ec8352b8730470ed6cdaf4b929c5 (patch)
tree9cf9d1832a0d02c6b6734f384fcdca7959e77972 /src/set/gnunet-service-set_intersection.c
parent389e0afa4cabf4c9ed980ef7021beca067a53498 (diff)
downloadgnunet-b479dddcac56ec8352b8730470ed6cdaf4b929c5.tar.gz
gnunet-b479dddcac56ec8352b8730470ed6cdaf4b929c5.zip
-remove trailing whitespace
Diffstat (limited to 'src/set/gnunet-service-set_intersection.c')
-rw-r--r--src/set/gnunet-service-set_intersection.c22
1 files changed, 11 insertions, 11 deletions
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
586process_bf (struct Operation *op){ 586process_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);