aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2013-03-21 01:53:58 +0000
committerFlorian Dold <florian.dold@gmail.com>2013-03-21 01:53:58 +0000
commit0f400440ed8e31091a40f8991fcb34769836cf2e (patch)
tree042f6f04a745602097735498219c9f92ead6cabb /src/consensus
parentaa1ffab9653cd9ec4957d38288206e5028e33452 (diff)
downloadgnunet-0f400440ed8e31091a40f8991fcb34769836cf2e.tar.gz
gnunet-0f400440ed8e31091a40f8991fcb34769836cf2e.zip
fix
Diffstat (limited to 'src/consensus')
-rw-r--r--src/consensus/gnunet-service-consensus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index e5785b4c4..4b69c5327 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -851,13 +851,13 @@ fin_sent_cb (void *cls)
851 { 851 {
852 case CONSENSUS_ROUND_EXCHANGE: 852 case CONSENSUS_ROUND_EXCHANGE:
853 case CONSENSUS_ROUND_STOCK: 853 case CONSENSUS_ROUND_STOCK:
854 /* the subround is only really over if *both* partners are done */
855 if (cpi->session->current_round != cpi->apparent_round) 854 if (cpi->session->current_round != cpi->apparent_round)
856 { 855 {
857 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "P%d: FIN to SYNC from the past\n", cpi->session->local_peer_idx); 856 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "P%d: FIN to SYNC from the past\n", cpi->session->local_peer_idx);
858 break; 857 break;
859 } 858 }
860 cpi->exp_subround_finished = GNUNET_YES; 859 cpi->exp_subround_finished = GNUNET_YES;
860 /* the subround is only really over if *both* partners are done */
861 if (GNUNET_YES == exp_subround_finished (cpi->session)) 861 if (GNUNET_YES == exp_subround_finished (cpi->session))
862 subround_over (cpi->session, NULL); 862 subround_over (cpi->session, NULL);
863 else 863 else
@@ -1087,6 +1087,8 @@ handle_p2p_ibf (struct ConsensusPeerInformation *cpi, const struct DifferenceDig
1087 1087
1088 /* FIXME: find out if we're still expecting the same ibf! */ 1088 /* FIXME: find out if we're still expecting the same ibf! */
1089 1089
1090 cpi->apparent_round = cpi->session->current_round;
1091
1090 num_buckets = (ntohs (digest->header.size) - (sizeof *digest)) / IBF_BUCKET_SIZE; 1092 num_buckets = (ntohs (digest->header.size) - (sizeof *digest)) / IBF_BUCKET_SIZE;
1091 switch (cpi->ibf_state) 1093 switch (cpi->ibf_state)
1092 { 1094 {
@@ -1352,6 +1354,7 @@ send_ibf (struct ConsensusPeerInformation *cpi)
1352 digest->header.size = htons (msize); 1354 digest->header.size = htons (msize);
1353 digest->header.type = htons (GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_DIFFERENCE_DIGEST); 1355 digest->header.type = htons (GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_DIFFERENCE_DIGEST);
1354 digest->order = cpi->ibf_order; 1356 digest->order = cpi->ibf_order;
1357 digest->round = cpi->apparent_round;
1355 1358
1356 buf = &digest[1]; 1359 buf = &digest[1];
1357 ibf_write_slice (cpi->ibf, cpi->ibf_bucket_counter, num_buckets, &buf, NULL); 1360 ibf_write_slice (cpi->ibf, cpi->ibf_bucket_counter, num_buckets, &buf, NULL);