- t->peers = GNUNET_CONTAINER_multihashmap_create(4);
- GNUNET_break (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (
- t->peers,
- &my_full_id.hashPubKey,
- peer_info_get(&my_full_id),
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
+ {
+ /* New tunnel! Notify clients! */
+ struct GNUNET_MESH_TunnelNotification cmsg;
+
+ cmsg.header.size = htons (sizeof (cmsg));
+ cmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
+ GNUNET_PEER_resolve (t->id.oid, &cmsg.peer);
+ cmsg.tunnel_id = htonl (t->local_tid);
+ GNUNET_SERVER_notification_context_broadcast (nc, &cmsg.header,
+ GNUNET_NO);
+
+ t->peers = GNUNET_CONTAINER_multihashmap_create (4);
+ }
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_CONTAINER_multihashmap_put (t->peers,
+ &my_full_id.hashPubKey,
+ peer_info_get
+ (&my_full_id),
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE));