gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5881 - GNUnet/src/applications/session


From: gnunet
Subject: [GNUnet-SVN] r5881 - GNUnet/src/applications/session
Date: Wed, 12 Dec 2007 13:52:48 -0700 (MST)

Author: grothoff
Date: 2007-12-12 13:52:47 -0700 (Wed, 12 Dec 2007)
New Revision: 5881

Modified:
   GNUnet/src/applications/session/connect.c
   GNUnet/src/applications/session/http-peer.conf
   GNUnet/src/applications/session/nat-http-peer.conf
   GNUnet/src/applications/session/nat-peer.conf
   GNUnet/src/applications/session/sessiontest_http.c
   GNUnet/src/applications/session/tcp-peer.conf
Log:
cleanup

Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c   2007-12-12 20:51:59 UTC (rev 
5880)
+++ GNUnet/src/applications/session/connect.c   2007-12-12 20:52:47 UTC (rev 
5881)
@@ -509,9 +509,19 @@
     hello = transport->createhello (GNUNET_TRANSPORT_PROTOCOL_NUMBER_ANY);
   if (NULL == hello)
     {
+      char * tports;
+
+      tports = NULL;
+      GNUNET_GC_get_configuration_value_string(coreAPI->cfg,
+                                              "GNUNETD",
+                                              "TRANSPORTS",
+                                              NULL,
+                                              &tports);
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_ERROR | GNUNET_GE_USER | GNUNET_GE_IMMEDIATE,
-                     _("Could not create any HELLO for myself!\n"));
+                     _("Could not create any HELLO for myself (have transports 
`%s')!\n"),
+                    tports);
+      GNUNET_free_non_null(tports);
     }
 #if DEBUG_SESSION
   GNUNET_GE_LOG (ectx,

Modified: GNUnet/src/applications/session/http-peer.conf
===================================================================
--- GNUnet/src/applications/session/http-peer.conf      2007-12-12 20:51:59 UTC 
(rev 5880)
+++ GNUnet/src/applications/session/http-peer.conf      2007-12-12 20:52:47 UTC 
(rev 5881)
@@ -1,6 +1,6 @@
 # This is the configuration for the non-NATed peer
 [PATHS]
-GNUNETD_HOME     = /tmp/gnunet-session-test-http
+GNUNETD_HOME     = /tmp/gnunet-session-test-http-with-nat
 
 [GNUNETD]
 HELLOEXPIRES     = 60
@@ -35,3 +35,5 @@
 [HTTP]
 PORT = 1080
 
+[NAT]
+LIMITED = NO

Modified: GNUnet/src/applications/session/nat-http-peer.conf
===================================================================
--- GNUnet/src/applications/session/nat-http-peer.conf  2007-12-12 20:51:59 UTC 
(rev 5880)
+++ GNUnet/src/applications/session/nat-http-peer.conf  2007-12-12 20:52:47 UTC 
(rev 5881)
@@ -9,7 +9,7 @@
 PIDFILE         = $GNUNETD_HOME/gnunetd.pid
 HOSTS          = $GNUNETD_HOME/data/hosts/
 APPLICATIONS = "advertising stats"
-TRANSPORTS = "http nat"
+TRANSPORTS = "nat http"
 
 [LOGGING]
 USER-LEVEL = ERROR

Modified: GNUnet/src/applications/session/nat-peer.conf
===================================================================
--- GNUnet/src/applications/session/nat-peer.conf       2007-12-12 20:51:59 UTC 
(rev 5880)
+++ GNUnet/src/applications/session/nat-peer.conf       2007-12-12 20:52:47 UTC 
(rev 5881)
@@ -9,7 +9,7 @@
 PIDFILE         = $GNUNETD_HOME/gnunetd.pid
 HOSTS          = $GNUNETD_HOME/data/hosts/
 APPLICATIONS = "advertising stats"
-TRANSPORTS = "tcp nat"
+TRANSPORTS = "nat tcp"
 
 [LOGGING]
 USER-LEVEL = ERROR

Modified: GNUnet/src/applications/session/sessiontest_http.c
===================================================================
--- GNUnet/src/applications/session/sessiontest_http.c  2007-12-12 20:51:59 UTC 
(rev 5880)
+++ GNUnet/src/applications/session/sessiontest_http.c  2007-12-12 20:52:47 UTC 
(rev 5881)
@@ -79,20 +79,26 @@
     {
       sock1 = GNUNET_client_connection_create (NULL, cfg1);
       sock2 = GNUNET_client_connection_create (NULL, cfg2);
-      h1 = NULL;
-      fprintf (stderr, "Notifying NATed peer about other peer");
-      if ((GNUNET_OK == GNUNET_IDENTITY_get_self (sock1,
-                                                  &h1)) &&
-          (GNUNET_OK == GNUNET_IDENTITY_peer_add (sock2, h1)))
-        {
-          fprintf (stderr, "!\n");
-          ret = GNUNET_OK;
-        }
-      else
-        fprintf (stderr, "?\n");
-      GNUNET_free_non_null (h1);
-      GNUNET_client_connection_destroy (sock1);
-      GNUNET_client_connection_destroy (sock2);
+      if ( (sock1 != NULL)&&
+          (sock2 != NULL) ) 
+       {
+         h1 = NULL;
+         fprintf (stderr, "Notifying NATed peer about other peer");
+         if ((GNUNET_OK == GNUNET_IDENTITY_get_self (sock1,
+                                                     &h1)) &&
+             (GNUNET_OK == GNUNET_IDENTITY_peer_add (sock2, h1)))
+           {
+             fprintf (stderr, "!\n");
+             ret = GNUNET_OK;
+           }
+         else
+           fprintf (stderr, "?\n");
+         GNUNET_free_non_null (h1);
+       }
+      if (sock1 != NULL)
+       GNUNET_client_connection_destroy (sock1);
+      if (sock2 != NULL)
+       GNUNET_client_connection_destroy (sock2);
     }
   else
     {

Modified: GNUnet/src/applications/session/tcp-peer.conf
===================================================================
--- GNUnet/src/applications/session/tcp-peer.conf       2007-12-12 20:51:59 UTC 
(rev 5880)
+++ GNUnet/src/applications/session/tcp-peer.conf       2007-12-12 20:52:47 UTC 
(rev 5881)
@@ -35,3 +35,5 @@
 [TCP]
 PORT = 2086
 
+[NAT]
+LIMITED = NO





reply via email to

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