aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet-new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new.c')
-rw-r--r--src/cadet/gnunet-service-cadet-new.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c
index b0a818c7c..93f53de4c 100644
--- a/src/cadet/gnunet-service-cadet-new.c
+++ b/src/cadet/gnunet-service-cadet-new.c
@@ -716,12 +716,18 @@ handle_local_data (void *cls,
716 msg->ccn); 716 msg->ccn);
717 if (NULL == ch) 717 if (NULL == ch)
718 { 718 {
719 /* Channel does not exist! */ 719 /* Channel does not exist (anymore) */
720 GNUNET_break (0); 720 LOG (GNUNET_ERROR_TYPE_WARNING,
721 GNUNET_SERVICE_client_drop (c->client); 721 "Dropping payload for channel %u from client (channel unknown, other endpoint may have disconnected)\n",
722 (unsigned int) ntohl (msg->ccn.channel_of_client));
723 GNUNET_SERVICE_client_continue (c->client);
722 return; 724 return;
723 } 725 }
724 payload_size = ntohs (msg->header.size) - sizeof (*msg); 726 payload_size = ntohs (msg->header.size) - sizeof (*msg);
727 GNUNET_STATISTICS_update (stats,
728 "# payload received from clients",
729 payload_size,
730 GNUNET_NO);
725 buf = (const char *) &msg[1]; 731 buf = (const char *) &msg[1];
726 LOG (GNUNET_ERROR_TYPE_DEBUG, 732 LOG (GNUNET_ERROR_TYPE_DEBUG,
727 "Received %u bytes payload from %s for %s\n", 733 "Received %u bytes payload from %s for %s\n",
@@ -758,9 +764,11 @@ handle_local_ack (void *cls,
758 msg->ccn); 764 msg->ccn);
759 if (NULL == ch) 765 if (NULL == ch)
760 { 766 {
761 /* Channel does not exist! */ 767 /* Channel does not exist (anymore) */
762 GNUNET_break (0); 768 LOG (GNUNET_ERROR_TYPE_WARNING,
763 GNUNET_SERVICE_client_drop (c->client); 769 "Ignoring local ACK for channel %u from client (channel unknown, other endpoint may have disconnected)\n",
770 (unsigned int) ntohl (msg->ccn.channel_of_client));
771 GNUNET_SERVICE_client_continue (c->client);
764 return; 772 return;
765 } 773 }
766 LOG (GNUNET_ERROR_TYPE_DEBUG, 774 LOG (GNUNET_ERROR_TYPE_DEBUG,