gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6631 - GNUnet/src/applications/testing


From: gnunet
Subject: [GNUnet-SVN] r6631 - GNUnet/src/applications/testing
Date: Wed, 26 Mar 2008 19:25:19 -0600 (MDT)

Author: nevans
Date: 2008-03-26 19:25:19 -0600 (Wed, 26 Mar 2008)
New Revision: 6631

Modified:
   GNUnet/src/applications/testing/remote.c
   GNUnet/src/applications/testing/remotetopologies.c
Log:
finally working in the lab\!

Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c    2008-03-27 00:49:25 UTC (rev 
6630)
+++ GNUnet/src/applications/testing/remote.c    2008-03-27 01:25:19 UTC (rev 
6631)
@@ -513,16 +513,38 @@
           fprintf (stderr, "scp command for friend file copy is : %s \n",
                    cmd);
           system (cmd);
-
+          GNUNET_free (cmd);
           pos = pos->next;
         }
 
       system ("rm friend.temp");
+
+      pos = head;
+      while (pos != NULL)
+        {
+          friend_pos = pos->friend_entries;
+          while (friend_pos != NULL)
+            {
+              fprintf (stderr, "connecting %s:%lld to %s:%lld\n",
+                       pos->hostname, pos->port,
+                       friend_pos->hostentry->hostname,
+                       friend_pos->hostentry->port);
+              fprintf (stderr, "or %s:%lld to %s\n", pos->hostname, pos->port,
+                       (const char *) friend_pos->nodeid);
+              GNUNET_REMOTE_connect_daemons (pos->hostname, pos->port,
+                                             friend_pos->hostentry->hostname,
+                                             friend_pos->hostentry->port);
+              friend_pos = friend_pos->next;
+            }
+          pos = pos->next;
+        }
     }
   else
     {
       fprintf (stderr, "connect didn't return well!\n");
     }
+
+
   return ret;
 }
 

Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c  2008-03-27 00:49:25 UTC 
(rev 6630)
+++ GNUnet/src/applications/testing/remotetopologies.c  2008-03-27 01:25:19 UTC 
(rev 6631)
@@ -65,13 +65,14 @@
                                                      iter_pos->port, &node1,
                                                      &node2))
             {
-              fprintf (stderr, "node1's id is %s\n", (const char *) node1);
-              fprintf (stderr, "node2's id is %s\n", (const char *) node2);
               node1temp =
                 GNUNET_malloc (sizeof (struct GNUNET_REMOTE_friends_list));
               node2temp =
                 GNUNET_malloc (sizeof (struct GNUNET_REMOTE_friends_list));
 
+              node2temp->hostentry = pos;
+              node1temp->hostentry = iter_pos;
+
               node1temp->nodeid = GNUNET_malloc (sizeof (GNUNET_EncName));
               node2temp->nodeid = GNUNET_malloc (sizeof (GNUNET_EncName));
 
@@ -196,12 +197,12 @@
         {
           fprintf (stderr,
                    "\nFailed to connect `%s' and `%s'\n",
-                   (const char *) &host1entry, (const char *) &host2entry);
+                   (const char *) host1entry, (const char *) host2entry);
           fprintf (stderr, "Connections of `%s':\n",
-                   (const char *) &host1entry);
+                   (const char *) host1entry);
           GNUNET_IDENTITY_request_peer_infos (sock1, &printInfo, NULL);
           fprintf (stderr, "Connections of `%s':\n",
-                   (const char *) &host2entry);
+                   (const char *) host2entry);
           GNUNET_IDENTITY_request_peer_infos (sock2, &printInfo, NULL);
 
         }





reply via email to

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