From: Christian Grothoff Date: Tue, 17 Aug 2010 13:23:23 +0000 (+0000) Subject: expose our hello to plugins X-Git-Tag: initial-import-from-subversion-38251~20668 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=09a6019741a09cb5b456dd06e31a6dd6b4800d5e;p=oweals%2Fgnunet.git expose our hello to plugins --- diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 83bbea183..6b56784db 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -1656,6 +1656,7 @@ transmit_to_peer (void *cls, GNUNET_PEER_change_rc (mb->target_list[i], -1); mb->target_list[i] = 0; mb->used_targets++; + memset (&migm, 0, sizeof (migm)); migm.header.size = htons (sizeof (migm) + mb->size); migm.header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT); migm.type = htonl (mb->type); diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 181d26845..a9a06ac77 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -5063,6 +5063,7 @@ create_environment (struct TransportPlugin *plug) plug->env.cfg = cfg; plug->env.sched = sched; plug->env.my_identity = &my_identity; + plug->env.our_hello = &our_hello; plug->env.cls = plug; plug->env.receive = &plugin_env_receive; plug->env.notify_address = &plugin_env_notify_address; diff --git a/src/transport/plugin_transport.h b/src/transport/plugin_transport.h index d3dc52f32..8c72f3242 100644 --- a/src/transport/plugin_transport.h +++ b/src/transport/plugin_transport.h @@ -180,6 +180,12 @@ struct GNUNET_TRANSPORT_PluginEnvironment */ const struct GNUNET_PeerIdentity *my_identity; + /** + * Pointer (!) to our HELLO message. Note that the address + * referred to "*our_hello" might change over time. + */ + const struct GNUNET_HELLO_Message **our_hello; + /** * Closure for the various callbacks. */