diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-07-23 05:47:31 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-07-23 05:47:31 +0000 |
commit | 39502a3e2999b700f0329f17ffb6fbd12e82bb25 (patch) | |
tree | 4b965513ec49b5693b56aadb2c4ec0baaf0d0318 /src/cadet/gnunet-service-cadet_channel.c | |
parent | 871e5bdc55f6d193f34c5536b179b9c7299f9bc9 (diff) | |
download | gnunet-39502a3e2999b700f0329f17ffb6fbd12e82bb25.tar.gz gnunet-39502a3e2999b700f0329f17ffb6fbd12e82bb25.zip |
- count a MIMD as received only after sending it to client
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 4f5763a50..1c58ab9f4 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -577,6 +577,7 @@ send_client_data (struct CadetChannel *ch, | |||
577 | { | 577 | { |
578 | GML_send_data (ch->dest, msg, ch->lid_dest); | 578 | GML_send_data (ch->dest, msg, ch->lid_dest); |
579 | ch->dest_rel->client_ready = GNUNET_NO; | 579 | ch->dest_rel->client_ready = GNUNET_NO; |
580 | ch->dest_rel->mid_recv++; | ||
580 | } | 581 | } |
581 | else | 582 | else |
582 | add_buffered_data (msg, ch->dest_rel); | 583 | add_buffered_data (msg, ch->dest_rel); |
@@ -587,6 +588,7 @@ send_client_data (struct CadetChannel *ch, | |||
587 | { | 588 | { |
588 | GML_send_data (ch->root, msg, ch->lid_root); | 589 | GML_send_data (ch->root, msg, ch->lid_root); |
589 | ch->root_rel->client_ready = GNUNET_NO; | 590 | ch->root_rel->client_ready = GNUNET_NO; |
591 | ch->root_rel->mid_recv++; | ||
590 | } | 592 | } |
591 | else | 593 | else |
592 | add_buffered_data (msg, ch->root_rel); | 594 | add_buffered_data (msg, ch->root_rel); |
@@ -622,7 +624,7 @@ send_client_buffered_data (struct CadetChannel *ch, | |||
622 | /* We never buffer channel management messages */ | 624 | /* We never buffer channel management messages */ |
623 | if (NULL != copy) | 625 | if (NULL != copy) |
624 | { | 626 | { |
625 | if (copy->mid <= rel->mid_recv || GNUNET_NO == ch->reliable) | 627 | if (copy->mid == rel->mid_recv || GNUNET_NO == ch->reliable) |
626 | { | 628 | { |
627 | struct GNUNET_CADET_Data *msg = (struct GNUNET_CADET_Data *) ©[1]; | 629 | struct GNUNET_CADET_Data *msg = (struct GNUNET_CADET_Data *) ©[1]; |
628 | 630 | ||
@@ -630,7 +632,6 @@ send_client_buffered_data (struct CadetChannel *ch, | |||
630 | copy->mid, rel->mid_recv + 1); | 632 | copy->mid, rel->mid_recv + 1); |
631 | send_client_data (ch, msg, fwd); | 633 | send_client_data (ch, msg, fwd); |
632 | rel->n_recv--; | 634 | rel->n_recv--; |
633 | rel->mid_recv++; | ||
634 | GCCH_send_data_ack (ch, fwd); | 635 | GCCH_send_data_ack (ch, fwd); |
635 | GNUNET_CONTAINER_DLL_remove (rel->head_recv, rel->tail_recv, copy); | 636 | GNUNET_CONTAINER_DLL_remove (rel->head_recv, rel->tail_recv, copy); |
636 | LOG (GNUNET_ERROR_TYPE_DEBUG, " COPYFREE RECV %p\n", copy); | 637 | LOG (GNUNET_ERROR_TYPE_DEBUG, " COPYFREE RECV %p\n", copy); |
@@ -1958,7 +1959,6 @@ GCCH_handle_data (struct CadetChannel *ch, | |||
1958 | if (mid == rel->mid_recv) | 1959 | if (mid == rel->mid_recv) |
1959 | { | 1960 | { |
1960 | LOG (GNUNET_ERROR_TYPE_DEBUG, "as expected, sending to client\n"); | 1961 | LOG (GNUNET_ERROR_TYPE_DEBUG, "as expected, sending to client\n"); |
1961 | rel->mid_recv++; | ||
1962 | send_client_data (ch, msg, fwd); | 1962 | send_client_data (ch, msg, fwd); |
1963 | } | 1963 | } |
1964 | else | 1964 | else |