diff options
author | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-02-04 09:34:38 +0000 |
---|---|---|
committer | wachs <wachs@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-02-04 09:34:38 +0000 |
commit | 49f4b72c3e79211d4c1f08de3220032ad710bee8 (patch) | |
tree | 9e0aa4e6b75fa326d5a06ad29600066619e3a0fa | |
parent | 29950778bec8b03bea9fc4203586389eb80f20d3 (diff) |
check code for 0002774
git-svn-id: https://gnunet.org/svn/gnunet@25996 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r-- | src/transport/gnunet-service-transport.c | 7 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 0b596d0214..bb091fafc5 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -614,6 +614,13 @@ key_generation_cb (void *cls, GST_my_private_key = pk; GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg); + if (NULL == GST_stats) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + _("Could not access STATISTICS service. Exiting.\n")); + GNUNET_SCHEDULER_shutdown (); + return; + } GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg); memset (&GST_my_public_key, '\0', sizeof (GST_my_public_key)); memset (&tmp, '\0', sizeof (tmp)); diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 8d026cd32d..01d474a0c4 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -2309,6 +2309,8 @@ libgnunet_plugin_transport_tcp_init (void *cls) return api; } + GNUNET_assert (NULL != env->cfg); + GNUNET_assert (NULL != env->stats); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (env->cfg, "transport-tcp", "MAX_CONNECTIONS", @@ -2376,8 +2378,8 @@ libgnunet_plugin_transport_tcp_init (void *cls) } else { - plugin->nat = - GNUNET_NAT_register (env->cfg, GNUNET_YES, 0, 0, NULL, NULL, NULL, + plugin->nat = GNUNET_NAT_register (plugin->env->cfg, + GNUNET_YES, 0, 0, NULL, NULL, NULL, &try_connection_reversal, plugin); } api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); |