diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-30 12:34:25 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-30 12:34:25 +0000 |
commit | 65a3e31d9bcaa76c1dc8ba7a7861851e9616a199 (patch) | |
tree | fd88017132afc05cc1c3c9b80865ed3cc907ac6d /src/stream | |
parent | e4c9cdaa7c2b70ff0f7508d0fa0eb808a98d07f2 (diff) | |
download | gnunet-65a3e31d9bcaa76c1dc8ba7a7861851e9616a199.tar.gz gnunet-65a3e31d9bcaa76c1dc8ba7a7861851e9616a199.zip |
clean exit while aborting
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/test_stream_2peers.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/stream/test_stream_2peers.c b/src/stream/test_stream_2peers.c index d597ac5c3..86d1a84ad 100644 --- a/src/stream/test_stream_2peers.c +++ b/src/stream/test_stream_2peers.c | |||
@@ -241,7 +241,10 @@ do_close (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
241 | GNUNET_SCHEDULER_cancel (abort_task); | 241 | GNUNET_SCHEDULER_cancel (abort_task); |
242 | if (NULL != peer1.socket) | 242 | if (NULL != peer1.socket) |
243 | GNUNET_STREAM_close (peer1.socket); | 243 | GNUNET_STREAM_close (peer1.socket); |
244 | GNUNET_TESTBED_operation_done (peer1.op); | 244 | if (NULL != peer1.op) |
245 | GNUNET_TESTBED_operation_done (peer1.op); | ||
246 | else | ||
247 | GNUNET_SCHEDULER_shutdown (); /* For shutting down testbed */ | ||
245 | } | 248 | } |
246 | 249 | ||
247 | 250 | ||
@@ -461,7 +464,10 @@ stream_da (void *cls, void *op_result) | |||
461 | { | 464 | { |
462 | lsocket = op_result; | 465 | lsocket = op_result; |
463 | GNUNET_STREAM_listen_close (lsocket); | 466 | GNUNET_STREAM_listen_close (lsocket); |
464 | GNUNET_TESTBED_operation_done (peer2.op); | 467 | if (NULL != peer2.op) |
468 | GNUNET_TESTBED_operation_done (peer2.op); | ||
469 | else | ||
470 | GNUNET_SCHEDULER_shutdown (); | ||
465 | return; | 471 | return; |
466 | } | 472 | } |
467 | if (&peer2 == cls) | 473 | if (&peer2 == cls) |