gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23755 - gnunet/src/stream


From: gnunet
Subject: [GNUnet-SVN] r23755 - gnunet/src/stream
Date: Wed, 12 Sep 2012 12:37:02 +0200

Author: harsha
Date: 2012-09-12 12:37:02 +0200 (Wed, 12 Sep 2012)
New Revision: 23755

Modified:
   gnunet/src/stream/perf_stream_api.c
   gnunet/src/stream/stream_api.c
Log:
fixes

Modified: gnunet/src/stream/perf_stream_api.c
===================================================================
--- gnunet/src/stream/perf_stream_api.c 2012-09-12 10:18:24 UTC (rev 23754)
+++ gnunet/src/stream/perf_stream_api.c 2012-09-12 10:37:02 UTC (rev 23755)
@@ -185,7 +185,7 @@
  * Payload sizes to test each major test with
  */
 static uint16_t payload_size[] = 
-{ 20, 500, 2000, 7000, 13000, 25000, 56000, 60000 };
+{ 20, 500, 2000, 7000, 13000, 25000, 50000, 60000 };
 
 /**
  * Handle for the progress meter
@@ -335,11 +335,11 @@
 static void
 do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
+  abort_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: ABORT\n");
   if (GNUNET_SCHEDULER_NO_TASK != read_task)
     GNUNET_SCHEDULER_cancel (read_task);
   result = GNUNET_SYSERR;
-  abort_task = GNUNET_SCHEDULER_NO_TASK;
   do_shutdown (cls, tc);
 }
 
@@ -550,7 +550,7 @@
   peer_data[2].self = self;
   abort_task =
     GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
-                                  (GNUNET_TIME_UNIT_SECONDS, 60), &do_abort,
+                                  (GNUNET_TIME_UNIT_SECONDS, 300), &do_abort,
                                   NULL);
 }
 

Modified: gnunet/src/stream/stream_api.c
===================================================================
--- gnunet/src/stream/stream_api.c      2012-09-12 10:18:24 UTC (rev 23754)
+++ gnunet/src/stream/stream_api.c      2012-09-12 10:37:02 UTC (rev 23755)
@@ -3101,6 +3101,7 @@
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
         "Closing STREAM socket when a read handle is pending\n");
+    GNUNET_STREAM_io_read_cancel (socket->read_handle);
   }
   if (NULL != socket->write_handle)
   {
@@ -3141,27 +3142,23 @@
     GNUNET_free (head->message);
     GNUNET_free (head);
   }
-
   /* Close associated tunnel */
   if (NULL != socket->tunnel)
   {
     GNUNET_MESH_tunnel_destroy (socket->tunnel);
     socket->tunnel = NULL;
   }
-
   /* Close mesh connection */
   if (NULL != socket->mesh && NULL == socket->lsocket)
   {
     GNUNET_MESH_disconnect (socket->mesh);
     socket->mesh = NULL;
-  }
-  
+  }  
   /* Release receive buffer */
   if (NULL != socket->receive_buffer)
   {
     GNUNET_free (socket->receive_buffer);
   }
-
   GNUNET_free (socket);
 }
 




reply via email to

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