aboutsummaryrefslogtreecommitdiff
path: root/src/stream/perf_stream_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/perf_stream_api.c')
-rw-r--r--src/stream/perf_stream_api.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/stream/perf_stream_api.c b/src/stream/perf_stream_api.c
index e7e37792a..9539415f4 100644
--- a/src/stream/perf_stream_api.c
+++ b/src/stream/perf_stream_api.c
@@ -438,7 +438,12 @@ write_completion (void *cls, enum GNUNET_STREAM_Status status, size_t size)
438 double throughput; 438 double throughput;
439 double prof_time_sec; 439 double prof_time_sec;
440 440
441 GNUNET_assert (GNUNET_STREAM_OK == status); 441 if (GNUNET_STREAM_OK != status)
442 {
443 GNUNET_SCHEDULER_cancel (abort_task);
444 abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
445 return;
446 }
442 GNUNET_assert (size <= DATA_SIZE); 447 GNUNET_assert (size <= DATA_SIZE);
443 pdata->bytes_wrote += size; 448 pdata->bytes_wrote += size;
444 for (;size > 0; size--) 449 for (;size > 0; size--)
@@ -537,7 +542,12 @@ input_processor (void *cls, enum GNUNET_STREAM_Status status,
537{ 542{
538 struct PeerData *pdata = cls; 543 struct PeerData *pdata = cls;
539 544
540 GNUNET_assert (GNUNET_STREAM_OK == status); 545 if (GNUNET_STREAM_OK != status)
546 {
547 GNUNET_SCHEDULER_cancel (abort_task);
548 abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
549 return 0;
550 }
541 GNUNET_assert (size < DATA_SIZE); 551 GNUNET_assert (size < DATA_SIZE);
542 GNUNET_assert (0 == memcmp (((void *)data ) + pdata->bytes_read, 552 GNUNET_assert (0 == memcmp (((void *)data ) + pdata->bytes_read,
543 input_data, size)); 553 input_data, size));