diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-12 10:37:02 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-12 10:37:02 +0000 |
commit | 7be14112c9baad0b15f2b810d9360914da1b481e (patch) | |
tree | 1f55e5213ae03044e713601bc2c3694941899366 /src/stream | |
parent | ec2206e33164fe6a8067bd634dbb647faec432c1 (diff) | |
download | gnunet-7be14112c9baad0b15f2b810d9360914da1b481e.tar.gz gnunet-7be14112c9baad0b15f2b810d9360914da1b481e.zip |
fixes
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/perf_stream_api.c | 6 | ||||
-rw-r--r-- | src/stream/stream_api.c | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/stream/perf_stream_api.c b/src/stream/perf_stream_api.c index 2aec2be57..696177cd0 100644 --- a/src/stream/perf_stream_api.c +++ b/src/stream/perf_stream_api.c | |||
@@ -185,7 +185,7 @@ static uint32_t data[DATA_SIZE / 4]; | |||
185 | * Payload sizes to test each major test with | 185 | * Payload sizes to test each major test with |
186 | */ | 186 | */ |
187 | static uint16_t payload_size[] = | 187 | static uint16_t payload_size[] = |
188 | { 20, 500, 2000, 7000, 13000, 25000, 56000, 60000 }; | 188 | { 20, 500, 2000, 7000, 13000, 25000, 50000, 60000 }; |
189 | 189 | ||
190 | /** | 190 | /** |
191 | * Handle for the progress meter | 191 | * Handle for the progress meter |
@@ -335,11 +335,11 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
335 | static void | 335 | static void |
336 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 336 | do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
337 | { | 337 | { |
338 | abort_task = GNUNET_SCHEDULER_NO_TASK; | ||
338 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: ABORT\n"); | 339 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: ABORT\n"); |
339 | if (GNUNET_SCHEDULER_NO_TASK != read_task) | 340 | if (GNUNET_SCHEDULER_NO_TASK != read_task) |
340 | GNUNET_SCHEDULER_cancel (read_task); | 341 | GNUNET_SCHEDULER_cancel (read_task); |
341 | result = GNUNET_SYSERR; | 342 | result = GNUNET_SYSERR; |
342 | abort_task = GNUNET_SCHEDULER_NO_TASK; | ||
343 | do_shutdown (cls, tc); | 343 | do_shutdown (cls, tc); |
344 | } | 344 | } |
345 | 345 | ||
@@ -550,7 +550,7 @@ run (void *cls, | |||
550 | peer_data[2].self = self; | 550 | peer_data[2].self = self; |
551 | abort_task = | 551 | abort_task = |
552 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 552 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
553 | (GNUNET_TIME_UNIT_SECONDS, 60), &do_abort, | 553 | (GNUNET_TIME_UNIT_SECONDS, 300), &do_abort, |
554 | NULL); | 554 | NULL); |
555 | } | 555 | } |
556 | 556 | ||
diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index 156dcd68f..0ef6ef85f 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c | |||
@@ -3101,6 +3101,7 @@ GNUNET_STREAM_close (struct GNUNET_STREAM_Socket *socket) | |||
3101 | { | 3101 | { |
3102 | LOG (GNUNET_ERROR_TYPE_WARNING, | 3102 | LOG (GNUNET_ERROR_TYPE_WARNING, |
3103 | "Closing STREAM socket when a read handle is pending\n"); | 3103 | "Closing STREAM socket when a read handle is pending\n"); |
3104 | GNUNET_STREAM_io_read_cancel (socket->read_handle); | ||
3104 | } | 3105 | } |
3105 | if (NULL != socket->write_handle) | 3106 | if (NULL != socket->write_handle) |
3106 | { | 3107 | { |
@@ -3141,27 +3142,23 @@ GNUNET_STREAM_close (struct GNUNET_STREAM_Socket *socket) | |||
3141 | GNUNET_free (head->message); | 3142 | GNUNET_free (head->message); |
3142 | GNUNET_free (head); | 3143 | GNUNET_free (head); |
3143 | } | 3144 | } |
3144 | |||
3145 | /* Close associated tunnel */ | 3145 | /* Close associated tunnel */ |
3146 | if (NULL != socket->tunnel) | 3146 | if (NULL != socket->tunnel) |
3147 | { | 3147 | { |
3148 | GNUNET_MESH_tunnel_destroy (socket->tunnel); | 3148 | GNUNET_MESH_tunnel_destroy (socket->tunnel); |
3149 | socket->tunnel = NULL; | 3149 | socket->tunnel = NULL; |
3150 | } | 3150 | } |
3151 | |||
3152 | /* Close mesh connection */ | 3151 | /* Close mesh connection */ |
3153 | if (NULL != socket->mesh && NULL == socket->lsocket) | 3152 | if (NULL != socket->mesh && NULL == socket->lsocket) |
3154 | { | 3153 | { |
3155 | GNUNET_MESH_disconnect (socket->mesh); | 3154 | GNUNET_MESH_disconnect (socket->mesh); |
3156 | socket->mesh = NULL; | 3155 | socket->mesh = NULL; |
3157 | } | 3156 | } |
3158 | |||
3159 | /* Release receive buffer */ | 3157 | /* Release receive buffer */ |
3160 | if (NULL != socket->receive_buffer) | 3158 | if (NULL != socket->receive_buffer) |
3161 | { | 3159 | { |
3162 | GNUNET_free (socket->receive_buffer); | 3160 | GNUNET_free (socket->receive_buffer); |
3163 | } | 3161 | } |
3164 | |||
3165 | GNUNET_free (socket); | 3162 | GNUNET_free (socket); |
3166 | } | 3163 | } |
3167 | 3164 | ||