diff options
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/.gitignore | 4 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 7 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_paths.c | 7 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/cadet/.gitignore b/src/cadet/.gitignore index 44382fde9..b556fa4c8 100644 --- a/src/cadet/.gitignore +++ b/src/cadet/.gitignore | |||
@@ -21,4 +21,6 @@ test_cadet_local | |||
21 | test_cadet_single | 21 | test_cadet_single |
22 | gnunet-service-cadet-new | 22 | gnunet-service-cadet-new |
23 | test_cadet_local_mq | 23 | test_cadet_local_mq |
24 | test_cadet_*_new \ No newline at end of file | 24 | test_cadet_*_newtest_cadet_2_reopen |
25 | test_cadet_5_reopen | ||
26 | test_cadet_2_reopen | ||
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 06711dc8b..8ef598132 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -500,6 +500,11 @@ channel_destroy (struct CadetChannel *ch) | |||
500 | GNUNET_free (crm->data_message); | 500 | GNUNET_free (crm->data_message); |
501 | GNUNET_free (crm); | 501 | GNUNET_free (crm); |
502 | } | 502 | } |
503 | if (CADET_CHANNEL_LOOSE == ch->state) | ||
504 | { | ||
505 | GSC_drop_loose_channel (&ch->h_port, | ||
506 | ch); | ||
507 | } | ||
503 | if (NULL != ch->owner) | 508 | if (NULL != ch->owner) |
504 | { | 509 | { |
505 | free_channel_client (ch->owner); | 510 | free_channel_client (ch->owner); |
@@ -1136,8 +1141,6 @@ GCCH_channel_local_destroy (struct CadetChannel *ch, | |||
1136 | target, but that never went anywhere. Nothing to do here. */ | 1141 | target, but that never went anywhere. Nothing to do here. */ |
1137 | break; | 1142 | break; |
1138 | case CADET_CHANNEL_LOOSE: | 1143 | case CADET_CHANNEL_LOOSE: |
1139 | GSC_drop_loose_channel (&ch->h_port, | ||
1140 | ch); | ||
1141 | break; | 1144 | break; |
1142 | default: | 1145 | default: |
1143 | GCT_send_channel_destroy (ch->t, | 1146 | GCT_send_channel_destroy (ch->t, |
diff --git a/src/cadet/gnunet-service-cadet_paths.c b/src/cadet/gnunet-service-cadet_paths.c index 593617ff6..40f464e9b 100644 --- a/src/cadet/gnunet-service-cadet_paths.c +++ b/src/cadet/gnunet-service-cadet_paths.c | |||
@@ -477,7 +477,6 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, | |||
477 | struct CadetPeer *cpath[get_path_length + put_path_length]; | 477 | struct CadetPeer *cpath[get_path_length + put_path_length]; |
478 | struct CheckMatchContext cm_ctx; | 478 | struct CheckMatchContext cm_ctx; |
479 | struct CadetPeerPath *path; | 479 | struct CadetPeerPath *path; |
480 | int i; | ||
481 | unsigned int skip; | 480 | unsigned int skip; |
482 | unsigned int total_len; | 481 | unsigned int total_len; |
483 | 482 | ||
@@ -527,7 +526,7 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, | |||
527 | cm_ctx.cpath_length = total_len; | 526 | cm_ctx.cpath_length = total_len; |
528 | cm_ctx.cpath = cpath; | 527 | cm_ctx.cpath = cpath; |
529 | cm_ctx.match = NULL; | 528 | cm_ctx.match = NULL; |
530 | for (i=total_len-1;i>=0;i--) | 529 | for (int i=total_len-1;i>=0;i--) |
531 | { | 530 | { |
532 | GCP_iterate_paths_at (cpath[i], | 531 | GCP_iterate_paths_at (cpath[i], |
533 | (unsigned int) i, | 532 | (unsigned int) i, |
@@ -562,7 +561,7 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, | |||
562 | path->entries_length = total_len; | 561 | path->entries_length = total_len; |
563 | path->entries = GNUNET_new_array (path->entries_length, | 562 | path->entries = GNUNET_new_array (path->entries_length, |
564 | struct CadetPeerPathEntry *); | 563 | struct CadetPeerPathEntry *); |
565 | for (i=path->entries_length-1;i>=0;i--) | 564 | for (int i=path->entries_length-1;i>=0;i--) |
566 | { | 565 | { |
567 | struct CadetPeerPathEntry *entry = GNUNET_new (struct CadetPeerPathEntry); | 566 | struct CadetPeerPathEntry *entry = GNUNET_new (struct CadetPeerPathEntry); |
568 | 567 | ||
@@ -570,7 +569,7 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path, | |||
570 | entry->peer = cpath[i]; | 569 | entry->peer = cpath[i]; |
571 | entry->path = path; | 570 | entry->path = path; |
572 | } | 571 | } |
573 | for (i=path->entries_length-1;i>=0;i--) | 572 | for (int i=path->entries_length-1;i>=0;i--) |
574 | { | 573 | { |
575 | struct CadetPeerPathEntry *entry = path->entries[i]; | 574 | struct CadetPeerPathEntry *entry = path->entries[i]; |
576 | 575 | ||