gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3337 - in GNUnet: . src/applications/session


From: grothoff
Subject: [GNUnet-SVN] r3337 - in GNUnet: . src/applications/session
Date: Sun, 27 Aug 2006 15:12:58 -0700 (PDT)

Author: grothoff
Date: 2006-08-27 15:12:55 -0700 (Sun, 27 Aug 2006)
New Revision: 3337

Modified:
   GNUnet/src/applications/session/connect.c
   GNUnet/src/applications/session/sessiontest.c
   GNUnet/todo
Log:
update

Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c   2006-08-27 21:37:28 UTC (rev 
3336)
+++ GNUnet/src/applications/session/connect.c   2006-08-27 22:12:55 UTC (rev 
3337)
@@ -160,10 +160,11 @@
   }
   /* check if we are allowed to accept connections
      from that peer */
+  limited = NULL;
   if (0 == GC_get_configuration_value_string(coreAPI->cfg,
                                             "GNUNETD",
                                             "LIMIT-ALLOW",
-                                            NULL,
+                                            "",
                                             &limited)) {
     EncName enc;
 
@@ -180,12 +181,13 @@
       FREE(limited);
       return SYSERR;
     }
-    FREE(limited);
   }
+  FREE(limited);
+  limited = NULL;
   if (0 == GC_get_configuration_value_string(coreAPI->cfg,
                                             "GNUNETD",
                                             "LIMIT-DENY",
-                                            NULL,
+                                            "",
                                             &limited)) {
     EncName enc;
 
@@ -202,8 +204,8 @@
       FREE(limited);
       return SYSERR;
     }
-    FREE(limited);
   }
+  FREE(limited);
 
   if (OK != identity->verifyPeerSignature
       (hostId,

Modified: GNUnet/src/applications/session/sessiontest.c
===================================================================
--- GNUnet/src/applications/session/sessiontest.c       2006-08-27 21:37:28 UTC 
(rev 3336)
+++ GNUnet/src/applications/session/sessiontest.c       2006-08-27 22:12:55 UTC 
(rev 3337)
@@ -97,39 +97,27 @@
                            cfg,
                            "peer2.conf",
                            NO);
-  PTHREAD_SLEEP(5 * cronSECONDS);
-
-  ret = 0;
-  left = 5;
-  /* wait for connection or abort with error */
-  do {
+  if (OK == connection_wait_for_running(NULL,
+                                       cfg,
+                                       30 * cronSECONDS)) {
     sock = client_connection_create(NULL,
                                    cfg);
-    if (sock == NULL) {
-      printf(_("Waiting for gnunetd to start (%u iterations left)...\n"),
+    left = 30; /* how many iterations should we wait? */
+    while (OK == requestStatistics(NULL,
+                                  sock,
+                                  &waitForConnect,
+                                  NULL)) {
+      printf("Waiting for peers to connect (%u iterations left)...\n",
             left);
-      sleep(1);
+      sleep(5);
       left--;
       if (left == 0) {
        ret = 1;
        break;
       }
     }
-  } while (sock == NULL);
-
-  left = 30; /* how many iterations should we wait? */
-  while (OK == requestStatistics(NULL,
-                                sock,
-                                &waitForConnect,
-                                NULL)) {
-    printf(_("Waiting for peers to connect (%u iterations left)...\n"),
-          left);
-    sleep(5);
-    left--;
-    if (left == 0) {
-      ret = 1;
-      break;
-    }
+  } else {
+    printf("Could not establish connection with peer.\n");
   }
   connection_destroy(sock);
   if (daemon1 != -1) {

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-08-27 21:37:28 UTC (rev 3336)
+++ GNUnet/todo 2006-08-27 22:12:55 UTC (rev 3337)
@@ -19,7 +19,7 @@
     + loggers: SMTP logger
     + use new loggers in for CS error reporting
   * make testcases compile & pass again:
-    + session -- compiles, but fails!
+    + session -- compiles, but fails (peers do not connect!)
     + kvstore_sqlite -- compiles, but fails!
     + gap
     + fs/ecrs





reply via email to

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