gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 02/02: fix crash on early abort due to dangling co


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 02/02: fix crash on early abort due to dangling connect task
Date: Sun, 22 Jan 2017 00:24:32 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 81e835f8d3f5a5db1b55a626ed908af4ff896f83
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 22 00:24:27 2017 +0100

    fix crash on early abort due to dangling connect task
---
 src/cadet/test_cadet_local.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/cadet/test_cadet_local.c b/src/cadet/test_cadet_local.c
index d15785cb0..05cfdb1ba 100644
--- a/src/cadet/test_cadet_local.c
+++ b/src/cadet/test_cadet_local.c
@@ -249,6 +249,7 @@ do_send (void *cls, size_t size, void *buf)
   return sizeof (struct GNUNET_MessageHeader);
 }
 
+
 /**
  * Connect to other client and send data
  *
@@ -261,13 +262,16 @@ do_connect (void *cls)
 
   connect_task = NULL;
   GNUNET_TESTING_peer_get_identity (me, &id);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CONNECT BY PORT\n");
-  ch = GNUNET_CADET_channel_create (cadet_peer_1, NULL, &id, GC_u2h (1),
-                                   GNUNET_CADET_OPTION_DEFAULT);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "CONNECT BY PORT\n");
+  ch = GNUNET_CADET_channel_create (cadet_peer_1,
+                                    NULL,
+                                    &id, GC_u2h (1),
+                                    GNUNET_CADET_OPTION_DEFAULT);
   mth = GNUNET_CADET_notify_transmit_ready (ch, GNUNET_NO,
-                                           GNUNET_TIME_UNIT_FOREVER_REL,
-                                           sizeof (struct 
GNUNET_MessageHeader),
-                                           &do_send, NULL);
+                                            GNUNET_TIME_UNIT_FOREVER_REL,
+                                            sizeof (struct 
GNUNET_MessageHeader),
+                                            &do_send, NULL);
 }
 
 
@@ -308,12 +312,15 @@ run (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  GNUNET_CADET_open_port (cadet_peer_2, GC_u2h (1),
-                          &inbound_channel, (void *) 2L);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (
-                                  GNUNET_TIME_UNIT_SECONDS,
-                                  2),
-                                &do_connect, NULL);
+  GNUNET_CADET_open_port (cadet_peer_2,
+                          GC_u2h (1),
+                          &inbound_channel,
+                          (void *) 2L);
+  connect_task
+    = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS,
+                                                                   2),
+                                    &do_connect,
+                                    NULL);
 }
 
 

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



reply via email to

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