[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32715 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32715 - gnunet/src/mesh |
Date: |
Fri, 21 Mar 2014 19:44:11 +0100 |
Author: bartpolot
Date: 2014-03-21 19:44:11 +0100 (Fri, 21 Mar 2014)
New Revision: 32715
Modified:
gnunet/src/mesh/gnunet-service-mesh_peer.c
Log:
- add DISABLE_TRY_CONNECT option
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2014-03-21 18:44:09 UTC (rev
32714)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2014-03-21 18:44:11 UTC (rev
32715)
@@ -207,9 +207,11 @@
*/
static struct GNUNET_CORE_Handle *core_handle;
+/**
+ * Handle to try to start new connections.
+ */
static struct GNUNET_TRANSPORT_Handle *transport_handle;
-
/******************************************************************************/
/***************************** CORE CALLBACKS
*********************************/
/******************************************************************************/
@@ -1277,12 +1279,11 @@
}
else
{
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "\n***************************************\n"
- "Mesh is running with drop mode enabled.\n"
- "This is NOT a good idea!\n"
- "Remove the DROP_PERCENT option from your configuration.\n"
- "***************************************\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING,
"**************************************\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING, "Mesh is running with DROP enabled.\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING, "This is NOT a good idea!\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING, "Remove DROP_PERCENT from config file.\n");
+ LOG (GNUNET_ERROR_TYPE_WARNING,
"**************************************\n");
}
core_handle = GNUNET_CORE_connect (c, /* Main configuration */
@@ -1295,11 +1296,17 @@
NULL, /* Don't notify about all
outbound messages */
GNUNET_NO, /* For header-only out
notification */
core_handlers); /* Register these
handlers */
- transport_handle = GNUNET_TRANSPORT_connect (c, &my_full_id,
- NULL, /* cls */
- NULL, NULL, NULL); /* Notify callbacks
*/
+ if (GNUNET_YES !=
+ GNUNET_CONFIGURATION_get_value_yesno (c, "MESH", "DISABLE_TRY_CONNECT"))
+ {
+ transport_handle = GNUNET_TRANSPORT_connect (c, &my_full_id, NULL, /* cls
*/
+ /* Notify callbacks */
+ NULL, NULL, NULL);
- if (NULL == core_handle || NULL == transport_handle)
+ }
+
+
+ if (NULL == core_handle)
{
GNUNET_break (0);
GNUNET_SCHEDULER_shutdown ();
@@ -1951,6 +1958,9 @@
struct GNUNET_HELLO_Message *hello;
struct GNUNET_MessageHeader *mh;
+ if (NULL == transport_handle)
+ return;
+
hello = GMP_get_hello (peer);
if (NULL == hello)
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32715 - gnunet/src/mesh,
gnunet <=