gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23409 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r23409 - gnunet/src/transport
Date: Fri, 24 Aug 2012 17:11:01 +0200

Author: wachs
Date: 2012-08-24 17:11:01 +0200 (Fri, 24 Aug 2012)
New Revision: 23409

Modified:
   gnunet/src/transport/plugin_transport_template.c
Log:
update


Modified: gnunet/src/transport/plugin_transport_template.c
===================================================================
--- gnunet/src/transport/plugin_transport_template.c    2012-08-24 14:51:02 UTC 
(rev 23408)
+++ gnunet/src/transport/plugin_transport_template.c    2012-08-24 15:11:01 UTC 
(rev 23409)
@@ -304,6 +304,18 @@
   struct GNUNET_TRANSPORT_PluginFunctions *api;
   struct Plugin *plugin;
 
+  if (NULL == env->receive)
+  {
+    /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
+       initialze the plugin or the API */
+    api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));
+    api->cls = NULL;
+    api->address_to_string = &template_plugin_address_to_string;
+    api->string_to_address = &template_plugin_string_to_address;
+    api->address_pretty_printer = &template_plugin_address_pretty_printer;
+    return api;
+  }
+
   plugin = GNUNET_malloc (sizeof (struct Plugin));
   plugin->env = env;
   api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]