gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: misc bugfixes


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: misc bugfixes
Date: Sat, 18 Feb 2017 17:17:44 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new e00dbaf68 misc bugfixes
e00dbaf68 is described below

commit e00dbaf6877d4a2177eedfea05bd3ac85e6afbb9
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Feb 18 17:17:42 2017 +0100

    misc bugfixes
---
 src/cadet/gnunet-service-cadet-new.c         | 11 +++++++----
 src/cadet/gnunet-service-cadet-new_channel.c | 13 ++++++++-----
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/cadet/gnunet-service-cadet-new.c 
b/src/cadet/gnunet-service-cadet-new.c
index b16767fbb..a9b30ccd5 100644
--- a/src/cadet/gnunet-service-cadet-new.c
+++ b/src/cadet/gnunet-service-cadet-new.c
@@ -617,12 +617,15 @@ handle_channel_destroy (void *cls,
                        msg->ccn);
   if (NULL == ch)
   {
-    /* Client attempted to destroy unknown channel */
-    GNUNET_break (0);
-    GNUNET_SERVICE_client_drop (c->client);
+    /* Client attempted to destroy unknown channel.
+       Can happen if the other side went down at the same time.*/
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "%s tried to destroy unknown channel %X\n",
+         GSC_2s(c),
+         ntohl (msg->ccn.channel_of_client));
     return;
   }
-  LOG (GNUNET_ERROR_TYPE_INFO,
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
        "%s is destroying %s\n",
        GSC_2s(c),
        GCCH_2s (ch));
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c 
b/src/cadet/gnunet-service-cadet-new_channel.c
index 9f565a7f4..c418893a8 100644
--- a/src/cadet/gnunet-service-cadet-new_channel.c
+++ b/src/cadet/gnunet-service-cadet-new_channel.c
@@ -749,6 +749,7 @@ GCCH_channel_incoming_new (struct CadetTunnel *t,
                                               port,
                                               ch,
                                               
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+    GNUNET_assert (NULL == ch->retry_control_task);
     ch->retry_control_task
       = GNUNET_SCHEDULER_add_delayed (TIMEOUT_CLOSED_PORT,
                                       &timeout_closed_cb,
@@ -834,10 +835,10 @@ send_open_ack (void *cls)
   struct CadetChannel *ch = cls;
   struct GNUNET_CADET_ChannelManageMessage msg;
 
+  ch->retry_control_task = NULL;
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Sending CHANNEL_OPEN_ACK on %s\n",
        GCCH_2s (ch));
-  ch->retry_control_task = NULL;
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK);
   msg.header.size = htons (sizeof (msg));
   msg.reserved = htonl (0);
@@ -1011,6 +1012,7 @@ signal_remote_destroy_cb (void *cls)
   struct CadetChannelClient *ccc;
 
   /* Find which end is left... */
+  ch->retry_control_task = NULL;
   ccc = (NULL != ch->owner) ? ch->owner : ch->dest;
   GSC_handle_remote_channel_destroy (ccc->c,
                                      ccc->ccn,
@@ -1780,7 +1782,7 @@ GCCH_handle_local_data (struct CadetChannel *ch,
     struct CadetChannelClient *receiver;
     struct GNUNET_MQ_Envelope *env;
     struct GNUNET_CADET_LocalData *ld;
-    int to_owner;
+    int ack_to_owner;
 
     env = GNUNET_MQ_msg_extra (ld,
                                buf_len,
@@ -1790,14 +1792,14 @@ GCCH_handle_local_data (struct CadetChannel *ch,
           ch->owner->ccn.channel_of_client) )
     {
       receiver = ch->dest;
-      to_owner = GNUNET_NO;
+      ack_to_owner = GNUNET_YES;
     }
     else if ( (NULL != ch->dest) &&
               (sender_ccn.channel_of_client ==
                ch->dest->ccn.channel_of_client) )
     {
       receiver = ch->owner;
-      to_owner = GNUNET_YES;
+      ack_to_owner = GNUNET_NO;
     }
     else
     {
@@ -1810,10 +1812,11 @@ GCCH_handle_local_data (struct CadetChannel *ch,
                    buf_len);
     if (GNUNET_YES == receiver->client_ready)
     {
+      ch->pending_messages--;
       GSC_send_to_client (receiver->c,
                           env);
       send_ack_to_client (ch,
-                          to_owner);
+                          ack_to_owner);
     }
     else
     {

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]