From c59f4b18074e7c2429761a4a7aeb222413260912 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 7 Nov 2013 17:43:36 +0000 Subject: [PATCH] - fix create handler when port is closed --- src/mesh/gnunet-service-mesh_tunnel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 07c907c6c..9815d1977 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c @@ -951,7 +951,8 @@ handle_ch_create (struct MeshTunnel3 *t, { ch = GMCH_handle_create (t, msg); } - GMT_add_channel (t, ch); + if (NULL != ch) + GMT_add_channel (t, ch); } @@ -1471,6 +1472,8 @@ GMT_add_channel (struct MeshTunnel3 *t, struct MeshChannel *ch) { struct MeshTChannel *aux; + GNUNET_assert (NULL != ch); + LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding channel %p to tunnel %p\n", ch, t); for (aux = t->channel_head; aux != NULL; aux = aux->next) -- 2.25.1