aboutsummaryrefslogtreecommitdiff
path: root/src/stream/perf_stream_api.c
diff options
context:
space:
mode:
authorharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2012-09-30 15:11:39 +0000
committerharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2012-09-30 15:11:39 +0000
commit91ecb58328ce1d1a9d7aea2c4f873d43a3f958d5 (patch)
treec47e04af1bc3f6470b62fcd02718712b0ef9316f /src/stream/perf_stream_api.c
parentd90def993d6464c37f2b5dcd748995a7672ea9ed (diff)
more fixes for #2570
git-svn-id: https://gnunet.org/svn/gnunet@24145 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/stream/perf_stream_api.c')
-rw-r--r--src/stream/perf_stream_api.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/stream/perf_stream_api.c b/src/stream/perf_stream_api.c
index 3dbdda256a..e7e37792a8 100644
--- a/src/stream/perf_stream_api.c
+++ b/src/stream/perf_stream_api.c
@@ -588,6 +588,15 @@ stream_listen_cb (void *cls, struct GNUNET_STREAM_Socket *socket,
{
struct PeerData *pdata = cls;
+
+ if ((NULL == socket) || (NULL == initiator))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Binding error\n");
+ if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ GNUNET_SCHEDULER_cancel (abort_task);
+ abort_task = GNUNET_SCHEDULER_add_now (&do_abort, NULL);
+ return GNUNET_OK;
+ }
GNUNET_assert (NULL != socket);
GNUNET_assert (pdata == &peer_data[1]);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer connected: %s\n",