aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-11-26 15:51:16 +0000
committerBart Polot <bart@net.in.tum.de>2013-11-26 15:51:16 +0000
commitbecdd68b8a27a47545f707c49b21633b51fef569 (patch)
treedadc75a515f2ef5203edc8345a372e6857082f3f /src
parent7a36cca82185cfaae4eb93b26677f9b198457459 (diff)
downloadgnunet-becdd68b8a27a47545f707c49b21633b51fef569.tar.gz
gnunet-becdd68b8a27a47545f707c49b21633b51fef569.zip
- allow for destruction of channel inside inbound handler
Diffstat (limited to 'src')
-rw-r--r--src/mesh/mesh_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index 943b006ad..36d25b4e2 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -771,6 +771,8 @@ process_channel_created (struct GNUNET_MESH_Handle *h,
771 } 771 }
772 if (NULL != h->new_channel) 772 if (NULL != h->new_channel)
773 { 773 {
774 void *ctx;
775
774 ch = create_channel (h, chid); 776 ch = create_channel (h, chid);
775 ch->allow_send = GNUNET_NO; 777 ch->allow_send = GNUNET_NO;
776 ch->peer = GNUNET_PEER_intern (&msg->peer); 778 ch->peer = GNUNET_PEER_intern (&msg->peer);
@@ -794,7 +796,9 @@ process_channel_created (struct GNUNET_MESH_Handle *h,
794 ch->ooorder = GNUNET_NO; 796 ch->ooorder = GNUNET_NO;
795 797
796 LOG (GNUNET_ERROR_TYPE_DEBUG, " created channel %p\n", ch); 798 LOG (GNUNET_ERROR_TYPE_DEBUG, " created channel %p\n", ch);
797 ch->ctx = h->new_channel (h->cls, ch, &msg->peer, ch->port); 799 ctx = h->new_channel (h->cls, ch, &msg->peer, ch->port);
800 if (NULL != ctx)
801 ch->ctx = ctx;
798 LOG (GNUNET_ERROR_TYPE_DEBUG, "User notified\n"); 802 LOG (GNUNET_ERROR_TYPE_DEBUG, "User notified\n");
799 } 803 }
800 else 804 else