aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/mesh_api.c')
-rw-r--r--src/mesh/mesh_api.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index 0ff46f01c..62b792c4b 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -1091,6 +1091,8 @@ process_get_tunnel (struct GNUNET_MESH_Handle *h,
1091 size_t msize; 1091 size_t msize;
1092 unsigned int ch_n; 1092 unsigned int ch_n;
1093 unsigned int c_n; 1093 unsigned int c_n;
1094 struct GNUNET_HashCode *conns;
1095 MESH_ChannelNumber *chns;
1094 1096
1095 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Get Tunnel messasge received\n"); 1097 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Get Tunnel messasge received\n");
1096 if (NULL == h->tunnel_cb) 1098 if (NULL == h->tunnel_cb)
@@ -1106,7 +1108,7 @@ process_get_tunnel (struct GNUNET_MESH_Handle *h,
1106 if (esize > msize) 1108 if (esize > msize)
1107 { 1109 {
1108 GNUNET_break_op (0); 1110 GNUNET_break_op (0);
1109 h->tunnel_cb (h->tunnel_cls, NULL, 0, 0, 0, 0); 1111 h->tunnel_cb (h->tunnel_cls, NULL, 0, 0, NULL, NULL, 0, 0);
1110 goto clean_cls; 1112 goto clean_cls;
1111 } 1113 }
1112 ch_n = ntohl (msg->channels); 1114 ch_n = ntohl (msg->channels);
@@ -1121,13 +1123,15 @@ process_get_tunnel (struct GNUNET_MESH_Handle *h,
1121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u (%u ch, %u conn)\n", 1123 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u (%u ch, %u conn)\n",
1122 sizeof (struct GNUNET_MESH_LocalInfoTunnel), 1124 sizeof (struct GNUNET_MESH_LocalInfoTunnel),
1123 sizeof (MESH_ChannelNumber), sizeof (struct GNUNET_HashCode)); 1125 sizeof (MESH_ChannelNumber), sizeof (struct GNUNET_HashCode));
1124 h->tunnel_cb (h->tunnel_cls, NULL, 0, 0, 0, 0); 1126 h->tunnel_cb (h->tunnel_cls, NULL, 0, 0, NULL, NULL, 0, 0);
1125 goto clean_cls; 1127 goto clean_cls;
1126 } 1128 }
1127 1129
1128 /* Call Callback with tunnel info. */ 1130 /* Call Callback with tunnel info. */
1131 conns = (struct GNUNET_HashCode *) &msg[1];
1132 chns = (MESH_ChannelNumber *) &conns[c_n];
1129 h->tunnel_cb (h->tunnel_cls, &msg->destination, 1133 h->tunnel_cb (h->tunnel_cls, &msg->destination,
1130 ch_n, c_n, 1134 ch_n, c_n, chns, conns,
1131 ntohs (msg->estate), ntohs (msg->cstate)); 1135 ntohs (msg->estate), ntohs (msg->cstate));
1132 1136
1133clean_cls: 1137clean_cls: