aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_connection.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-03-22 02:58:37 +0000
committerBart Polot <bart@net.in.tum.de>2014-03-22 02:58:37 +0000
commit8a34eda383c4759de0f5acb73410bc9f94a8da84 (patch)
treec9960d463cacd1a9a42211694079dfaadd61f84c /src/mesh/gnunet-service-mesh_connection.c
parent944d27ead72c28c99319495dccc7a89db910f7ad (diff)
downloadgnunet-8a34eda383c4759de0f5acb73410bc9f94a8da84.tar.gz
gnunet-8a34eda383c4759de0f5acb73410bc9f94a8da84.zip
- fix peer to notify
Diffstat (limited to 'src/mesh/gnunet-service-mesh_connection.c')
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index 15a6164cb..5a87db99a 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -1776,13 +1776,15 @@ GMC_handle_broken (void* cls,
1776 if (GMC_is_terminal (c, fwd)) 1776 if (GMC_is_terminal (c, fwd))
1777 { 1777 {
1778 struct GNUNET_MessageHeader *out_msg; 1778 struct GNUNET_MessageHeader *out_msg;
1779 struct MeshPeer *peer; 1779 struct MeshPeer *neighbor;
1780 struct MeshPeer *endpoint;
1780 1781
1781 peer = get_hop (c, !fwd); 1782 neighbor = get_hop (c, !fwd);
1783 endpoint = GMP_get_short (c->path->peers[c->path->length - 1]);
1782 path_invalidate (c->path); 1784 path_invalidate (c->path);
1783 GMP_notify_broken_link (c->t, &msg->peer1, &msg->peer2); 1785 GMP_notify_broken_link (endpoint, &msg->peer1, &msg->peer2);
1784 c->state = MESH_CONNECTION_DESTROYED; 1786 c->state = MESH_CONNECTION_DESTROYED;
1785 while (NULL != (out_msg = GMP_connection_pop (peer, c))) 1787 while (NULL != (out_msg = GMP_connection_pop (neighbor, c)))
1786 { 1788 {
1787 GNUNET_assert (NULL == 1789 GNUNET_assert (NULL ==
1788 GMT_send_prebuilt_message (out_msg, c->t, NULL, GNUNET_YES, 1790 GMT_send_prebuilt_message (out_msg, c->t, NULL, GNUNET_YES,