aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_template.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-08-24 15:11:01 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-08-24 15:11:01 +0000
commit3f70e71b5e73cb6464bcdccdc69be22cfbc3af69 (patch)
tree6c98df771f1ff86ea776742a2bc8af071e931085 /src/transport/plugin_transport_template.c
parent8c3ea6f58287d4c7382b31f116580898f30aa914 (diff)
downloadgnunet-3f70e71b5e73cb6464bcdccdc69be22cfbc3af69.tar.gz
gnunet-3f70e71b5e73cb6464bcdccdc69be22cfbc3af69.zip
update
Diffstat (limited to 'src/transport/plugin_transport_template.c')
-rw-r--r--src/transport/plugin_transport_template.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 1f0cc5fbb..8c15f8778 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -304,6 +304,18 @@ gnunet_plugin_transport_template_init (void *cls)
304 struct GNUNET_TRANSPORT_PluginFunctions *api; 304 struct GNUNET_TRANSPORT_PluginFunctions *api;
305 struct Plugin *plugin; 305 struct Plugin *plugin;
306 306
307 if (NULL == env->receive)
308 {
309 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
310 initialze the plugin or the API */
311 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
312 api->cls = NULL;
313 api->address_to_string = &template_plugin_address_to_string;
314 api->string_to_address = &template_plugin_string_to_address;
315 api->address_pretty_printer = &template_plugin_address_pretty_printer;
316 return api;
317 }
318
307 plugin = GNUNET_malloc (sizeof (struct Plugin)); 319 plugin = GNUNET_malloc (sizeof (struct Plugin));
308 plugin->env = env; 320 plugin->env = env;
309 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 321 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));