aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_api_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/cadet_api_new.c')
-rw-r--r--src/cadet/cadet_api_new.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/cadet/cadet_api_new.c b/src/cadet/cadet_api_new.c
index a62de0a47..2d5d853b3 100644
--- a/src/cadet/cadet_api_new.c
+++ b/src/cadet/cadet_api_new.c
@@ -626,7 +626,6 @@ handle_channel_created (void *cls,
626 struct GNUNET_CADET_LocalChannelDestroyMessage *d_msg; 626 struct GNUNET_CADET_LocalChannelDestroyMessage *d_msg;
627 struct GNUNET_MQ_Envelope *env; 627 struct GNUNET_MQ_Envelope *env;
628 628
629 GNUNET_break (0);
630 LOG (GNUNET_ERROR_TYPE_DEBUG, 629 LOG (GNUNET_ERROR_TYPE_DEBUG,
631 "No handler for incoming channel %X (on port %s, recently closed?)\n", 630 "No handler for incoming channel %X (on port %s, recently closed?)\n",
632 ntohl (ccn.channel_of_client), 631 ntohl (ccn.channel_of_client),
@@ -682,16 +681,18 @@ handle_channel_destroy (void *cls,
682 struct GNUNET_CADET_Handle *h = cls; 681 struct GNUNET_CADET_Handle *h = cls;
683 struct GNUNET_CADET_Channel *ch; 682 struct GNUNET_CADET_Channel *ch;
684 683
685 LOG (GNUNET_ERROR_TYPE_DEBUG,
686 "Received channel destroy for channel %X from CADET service\n",
687 ntohl (msg->ccn.channel_of_client));
688 ch = find_channel (h, 684 ch = find_channel (h,
689 msg->ccn); 685 msg->ccn);
690 if (NULL == ch) 686 if (NULL == ch)
691 { 687 {
692 GNUNET_break (0); 688 LOG (GNUNET_ERROR_TYPE_DEBUG,
689 "Received channel destroy for unknown channel %X from CADET service (recently close?)\n",
690 ntohl (msg->ccn.channel_of_client));
693 return; 691 return;
694 } 692 }
693 LOG (GNUNET_ERROR_TYPE_DEBUG,
694 "Received channel destroy for channel %X from CADET service\n",
695 ntohl (msg->ccn.channel_of_client));
695 destroy_channel (ch); 696 destroy_channel (ch);
696} 697}
697 698
@@ -708,8 +709,6 @@ static int
708check_local_data (void *cls, 709check_local_data (void *cls,
709 const struct GNUNET_CADET_LocalData *message) 710 const struct GNUNET_CADET_LocalData *message)
710{ 711{
711 struct GNUNET_CADET_Handle *h = cls;
712 struct GNUNET_CADET_Channel *ch;
713 uint16_t size; 712 uint16_t size;
714 713
715 size = ntohs (message->header.size); 714 size = ntohs (message->header.size);
@@ -718,15 +717,6 @@ check_local_data (void *cls,
718 GNUNET_break (0); 717 GNUNET_break (0);
719 return GNUNET_SYSERR; 718 return GNUNET_SYSERR;
720 } 719 }
721
722 ch = find_channel (h,
723 message->ccn);
724 if (NULL == ch)
725 {
726 GNUNET_break (0);
727 return GNUNET_SYSERR;
728 }
729
730 return GNUNET_OK; 720 return GNUNET_OK;
731} 721}
732 722
@@ -751,8 +741,9 @@ handle_local_data (void *cls,
751 message->ccn); 741 message->ccn);
752 if (NULL == ch) 742 if (NULL == ch)
753 { 743 {
754 GNUNET_break (0); 744 LOG (GNUNET_ERROR_TYPE_DEBUG,
755 reconnect (h); 745 "Unknown channel %X for incoming data (recently closed?)\n",
746 ntohl (message->ccn.channel_of_client));
756 return; 747 return;
757 } 748 }
758 749