gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3768 - in GNUnet/src/applications: identity transport


From: grothoff
Subject: [GNUnet-SVN] r3768 - in GNUnet/src/applications: identity transport
Date: Tue, 14 Nov 2006 17:20:23 -0800 (PST)

Author: grothoff
Date: 2006-11-14 17:20:22 -0800 (Tue, 14 Nov 2006)
New Revision: 3768

Modified:
   GNUnet/src/applications/identity/identitytest.c
   GNUnet/src/applications/transport/transport.c
Log:
fixes

Modified: GNUnet/src/applications/identity/identitytest.c
===================================================================
--- GNUnet/src/applications/identity/identitytest.c     2006-11-15 01:14:56 UTC 
(rev 3767)
+++ GNUnet/src/applications/identity/identitytest.c     2006-11-15 01:20:22 UTC 
(rev 3768)
@@ -33,10 +33,13 @@
 #include "gnunet_util_config_impl.h"
 #include "core.h"
 
+static struct CronManager * cron;
+
 #define ASSERT(cond) do { \
   if (!cond) { \
    printf("Assertion failed at %s:%d\n", \
           __FILE__, __LINE__); \
+   cron_stop(cron); \
    releaseService(identity); \
    releaseService(transport); \
    return SYSERR; \
@@ -53,12 +56,15 @@
 
   transport = requestService("transport");
   identity = requestService("identity");
+  cron_start(cron);
+  PTHREAD_SLEEP(30 * cronSECONDS);
   helo = transport->createhello(ANY_PROTOCOL_NUMBER);
   if (NULL == helo) {
     printf("Cannot run test, failed to create any hello.\n");
+    cron_stop(cron);
     releaseService(identity);
     releaseService(transport);
-    return OK;
+    return SYSERR;
   }
   identity->addHost(helo);
   pid = helo->senderIdentity;
@@ -97,6 +103,7 @@
   /* to test:
      hello verification, temporary storage,
      permanent storage, blacklisting, etc. */
+  cron_stop(cron);
   releaseService(identity);
   releaseService(transport);
   return OK;
@@ -105,7 +112,6 @@
 int main(int argc, char *argv[]) {
   int err;
   struct GC_Configuration * cfg;
-  struct CronManager * cron;
 
   cfg = GC_create_C_impl();
   if (-1 == GC_parse_configuration(cfg,

Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c       2006-11-15 01:14:56 UTC 
(rev 3767)
+++ GNUnet/src/applications/transport/transport.c       2006-11-15 01:20:22 UTC 
(rev 3768)
@@ -340,7 +340,8 @@
  * Create a hello advertisement for the given
  * transport type for this node.
  */
-static P2P_hello_MESSAGE * transportCreatehello(unsigned short ttype) {
+static P2P_hello_MESSAGE * 
+transportCreatehello(unsigned short ttype) {
   TransportAPI * tapi;
   P2P_hello_MESSAGE * helo;
 





reply via email to

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