From: Bart Polot Date: Tue, 25 Jun 2013 15:19:01 +0000 (+0000) Subject: - fix 2906 X-Git-Tag: initial-import-from-subversion-38251~8644 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d02a7556815c39b9fcc2c31173c7ea389e32bcc3;p=oweals%2Fgnunet.git - fix 2906 --- diff --git a/src/mesh/mesh2_api.c b/src/mesh/mesh2_api.c index 2245b03f4..c07040192 100644 --- a/src/mesh/mesh2_api.c +++ b/src/mesh/mesh2_api.c @@ -823,7 +823,6 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h, t = create_tunnel (h, tid); t->last_ack_sent = 0; t->peer = GNUNET_PEER_intern (&msg->peer); - GNUNET_PEER_change_rc (t->peer, 1); t->mesh = h; t->tid = tid; t->port = ntohl (msg->port); @@ -1203,7 +1202,7 @@ send_callback (void *cls, size_t size, void *buf) struct GNUNET_MessageHeader *mh; LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload\n"); - if (GNUNET_NO == GMC_is_pid_bigger(t->last_ack_recv, t->last_pid_sent)) + if (GNUNET_NO == GMC_is_pid_bigger (t->last_ack_recv, t->last_pid_sent)) { /* This tunnel is not ready to transmit yet, try next message */ next = th->next; @@ -1227,7 +1226,6 @@ send_callback (void *cls, size_t size, void *buf) } if (t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV) { - /* traffic to origin */ dmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN); LOG (GNUNET_ERROR_TYPE_DEBUG, "# to origin, type %s\n", GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); @@ -1456,6 +1454,7 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, LOG (GNUNET_ERROR_TYPE_DEBUG, " at %p\n", t); LOG (GNUNET_ERROR_TYPE_DEBUG, " number %X\n", t->tid); t->ctx = tunnel_ctx; + t->peer = GNUNET_PEER_intern (peer); msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); msg.tunnel_id = htonl (t->tid);