gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5912 - in GNUnet/src: applications/dht/module applications


From: gnunet
Subject: [GNUnet-SVN] r5912 - in GNUnet/src: applications/dht/module applications/dht/tools applications/fragmentation applications/pingpong applications/testbed applications/tracekit transports
Date: Sat, 15 Dec 2007 03:15:16 -0700 (MST)

Author: grothoff
Date: 2007-12-15 03:15:16 -0700 (Sat, 15 Dec 2007)
New Revision: 5912

Modified:
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dht/module/table.c
   GNUnet/src/applications/dht/tools/dhttest.c
   GNUnet/src/applications/dht/tools/dhttest2.c
   GNUnet/src/applications/fragmentation/fragmentationtest.c
   GNUnet/src/applications/pingpong/pingpong.c
   GNUnet/src/applications/testbed/testbed.c
   GNUnet/src/applications/tracekit/tracekit.c
   GNUnet/src/transports/test.c
   GNUnet/src/transports/test_repeat.c
Log:
formatting

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/dht/module/cs.c     2007-12-15 10:15:16 UTC (rev 
5912)
@@ -207,7 +207,7 @@
           GNUNET_free (pos);
           GNUNET_mutex_lock (lock);
           pos = getRecords;
-         continue;
+          continue;
         }
       prev = pos;
       pos = pos->next;

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2007-12-15 10:15:06 UTC 
(rev 5911)
+++ GNUnet/src/applications/dht/module/routing.c        2007-12-15 10:15:16 UTC 
(rev 5912)
@@ -184,7 +184,7 @@
 /**
  * Linked list of active records.
  */
-static DHTQueryRecord * records;
+static DHTQueryRecord *records;
 
 /**
  * Size of records
@@ -219,21 +219,21 @@
  * target_replication count (on average).
  */
 static unsigned int
-get_forward_count(unsigned int hop_count,
-                 double target_replication) 
+get_forward_count (unsigned int hop_count, double target_replication)
 {
   double target_count;
   unsigned int target_value;
   unsigned int diameter;
 
-  diameter = GNUNET_DHT_estimate_network_diameter();
+  diameter = GNUNET_DHT_estimate_network_diameter ();
   if (hop_count > (diameter + 1) * 2)
     return 0;
-  target_count = target_replication / (target_replication * hop_count + 
diameter);
+  target_count =
+    target_replication / (target_replication * hop_count + diameter);
   target_value = 0;
   while (target_value < target_count)
     target_value++;
-  if ( (target_count + 1 - target_value ) > drand48())
+  if ((target_count + 1 - target_value) > drand48 ())
     target_value++;
   return target_value;
 }
@@ -330,15 +330,15 @@
                              "Route to peer `%s' has expired (%llu < %llu)\n",
                              &enc, pos->expire, now);
 #endif
-             if (prev == NULL)
-               q->sources = pos->next;
-             else
-               prev->next = pos->next;
-             GNUNET_free(pos);
-             if (prev == NULL)
-               pos = q->sources;
-             else
-               pos = prev->next;             
+              if (prev == NULL)
+                q->sources = pos->next;
+              else
+                prev->next = pos->next;
+              GNUNET_free (pos);
+              if (prev == NULL)
+                pos = q->sources;
+              else
+                pos = prev->next;
               continue;
             }
           if (0 != memcmp (&pos->source,
@@ -352,8 +352,7 @@
                              "Routing result to `%s'\n", &enc);
 #endif
               coreAPI->unicast (&pos->source,
-                                &result->header, DHT_PRIORITY,
-                                DHT_DELAY);
+                                &result->header, DHT_PRIORITY, DHT_DELAY);
               if (stats != NULL)
                 stats->change (stat_replies_routed, 1);
             }
@@ -372,7 +371,7 @@
           pos = pos->next;
         }
       if (q->result_count >= MAX_RESULTS)
-         q->expire = 0;          
+        q->expire = 0;
       break;
     }
   GNUNET_mutex_unlock (lock);
@@ -403,7 +402,7 @@
   struct DHT_Source_Route *pos;
 
   hops = ntohl (get->hop_count);
-  diameter = GNUNET_DHT_estimate_network_diameter();
+  diameter = GNUNET_DHT_estimate_network_diameter ();
   if (hops > 2 * diameter)
     return GNUNET_SYSERR;
   now = GNUNET_get_time ();
@@ -413,12 +412,12 @@
   for (i = 0; i < rt_size; i++)
     {
       q = &records[i];
-      if ( (q->expire > now) &&
-          ( (0 != memcmp (&q->get.key,
-                          &get->key,
-                          sizeof (GNUNET_HashCode))) ||
-            (q->get.type == get->type)) )
-       continue; /* used and not an identical request */
+      if ((q->expire > now) &&
+          ((0 != memcmp (&q->get.key,
+                         &get->key,
+                         sizeof (GNUNET_HashCode))) ||
+           (q->get.type == get->type)))
+        continue;               /* used and not an identical request */
       if (q->expire < now)
         {
           rt_pos = i;
@@ -428,22 +427,18 @@
               q->sources = pos->next;
               GNUNET_free (pos);
             }
-         GNUNET_array_grow(q->results,
-                           q->result_count,
-                           0);
-         q->expire = 0;
+          GNUNET_array_grow (q->results, q->result_count, 0);
+          q->expire = 0;
         }
-      if ( (0 == memcmp (&q->get.key,
-                        &get->key,
-                        sizeof (GNUNET_HashCode)) &&
-           (q->get.type == get->type)) ) 
-       {
-         GNUNET_array_grow(q->results,
-                           q->result_count,
-                           0);
-         rt_pos = i;
-         break;
-       }
+      if ((0 == memcmp (&q->get.key,
+                        &get->key,
+                        sizeof (GNUNET_HashCode)) &&
+           (q->get.type == get->type)))
+        {
+          GNUNET_array_grow (q->results, q->result_count, 0);
+          rt_pos = i;
+          break;
+        }
     }
   if (rt_pos == rt_size)
     {
@@ -535,8 +530,8 @@
       return GNUNET_OK;
     }
   aget = *get;
-  hop_count = ntohl(get->hop_count);
-  target_value = get_forward_count(hop_count, GET_TRIES);
+  hop_count = ntohl (get->hop_count);
+  target_value = get_forward_count (hop_count, GET_TRIES);
   aget.hop_count = htonl (1 + hop_count);
   for (i = 0; i < target_value; i++)
     {
@@ -555,9 +550,9 @@
 #if DEBUG_ROUTING
       GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
       GNUNET_GE_LOG (coreAPI->ectx,
-                    GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                    GNUNET_GE_DEVELOPER,
-                         "Forwarding DHT GET request to peer `%s'.\n", &enc);
+                     GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                     GNUNET_GE_DEVELOPER,
+                     "Forwarding DHT GET request to peer `%s'.\n", &enc);
 #endif
       coreAPI->unicast (&next[i], &aget.header, DHT_PRIORITY, DHT_DELAY);
     }
@@ -572,8 +567,8 @@
            const GNUNET_MessageHeader * msg)
 {
   GNUNET_PeerIdentity next[PUT_TRIES];
-  const DHT_MESSAGE * put;
-  DHT_MESSAGE * aput;
+  const DHT_MESSAGE *put;
+  DHT_MESSAGE *aput;
   GNUNET_CronTime now;
   unsigned int hop_count;
   unsigned int target_value;
@@ -598,13 +593,11 @@
                  "Received DHT PUT for key `%s'.\n", &enc);
 #endif
   store = 0;
-  hop_count = htons(put->hop_count);
-  target_value = get_forward_count(hop_count, PUT_TRIES);
-  aput = GNUNET_malloc(ntohs(msg->size));
-  memcpy(aput,
-        put,
-        ntohs(msg->size));
-  aput->hop_count = htons(hop_count + 1);
+  hop_count = htons (put->hop_count);
+  target_value = get_forward_count (hop_count, PUT_TRIES);
+  aput = GNUNET_malloc (ntohs (msg->size));
+  memcpy (aput, put, ntohs (msg->size));
+  aput->hop_count = htons (hop_count + 1);
 
 
   for (i = 0; i < target_value; i++)
@@ -624,17 +617,17 @@
       if (1 == GNUNET_hash_xorcmp (&next[i].hashPubKey,
                                    &coreAPI->myIdentity->hashPubKey,
                                    &put->key))
-       store = 1;            /* we're closer than the selected target */
+        store = 1;              /* we're closer than the selected target */
 #if DEBUG_ROUTING
       GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
       GNUNET_GE_LOG (coreAPI->ectx,
-                    GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                    GNUNET_GE_DEVELOPER,
-                    "Forwarding DHT PUT request to peer `%s'.\n", &enc);
+                     GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                     GNUNET_GE_DEVELOPER,
+                     "Forwarding DHT PUT request to peer `%s'.\n", &enc);
 #endif
       coreAPI->unicast (&next[i], &aput->header, DHT_PRIORITY, DHT_DELAY);
     }
-  GNUNET_free(aput);
+  GNUNET_free (aput);
   if (store != 0)
     {
       now = GNUNET_get_time ();
@@ -753,10 +746,10 @@
       pos = records[i].sources;
       while (pos != NULL)
         {
-          if ( (pos->receiver == handler) &&
-              (pos->receiver_closure == cls) &&
-              (0 == memcmp (key,
-                            &records[i].get.key, sizeof (GNUNET_HashCode))))
+          if ((pos->receiver == handler) &&
+              (pos->receiver_closure == cls) &&
+              (0 == memcmp (key,
+                            &records[i].get.key, sizeof (GNUNET_HashCode))))
             {
               if (prev == NULL)
                 records[i].sources = pos->next;
@@ -771,9 +764,7 @@
         }
       if (records[i].sources == NULL)
         {
-         GNUNET_array_grow(records[i].results,
-                           records[i].result_count,
-                           0);
+          GNUNET_array_grow (records[i].results, records[i].result_count, 0);
           records[i].expire = 0;
         }
       if (done == GNUNET_YES)
@@ -904,17 +895,15 @@
       stats = NULL;
     }
   GNUNET_mutex_destroy (lock);
- for (i = 0; i < rt_size; i++)
+  for (i = 0; i < rt_size; i++)
     {
       while (records[i].sources != NULL)
         {
-         pos = records[i].sources;
-         records[i].sources = pos->next;
-         GNUNET_free (pos);
+          pos = records[i].sources;
+          records[i].sources = pos->next;
+          GNUNET_free (pos);
         }
-      GNUNET_array_grow(records[i].results,
-                       records[i].result_count,
-                       0);
+      GNUNET_array_grow (records[i].results, records[i].result_count, 0);
     }
   GNUNET_array_grow (records, rt_size, 0);
   coreAPI->release_service (dstore);

Modified: GNUnet/src/applications/dht/module/table.c
===================================================================
--- GNUnet/src/applications/dht/module/table.c  2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/dht/module/table.c  2007-12-15 10:15:16 UTC (rev 
5912)
@@ -232,13 +232,14 @@
  *
  * @return estimated network diameter
  */
-unsigned int GNUNET_DHT_estimate_network_diameter () 
+unsigned int
+GNUNET_DHT_estimate_network_diameter ()
 {
   unsigned int i;
-  for (i=bucketCount-1;i>0;i--)
+  for (i = bucketCount - 1; i > 0; i--)
     {
       if (buckets[i].peers_size > 0)
-       break;
+        break;
     }
   return i + 1;
 }
@@ -592,7 +593,7 @@
           bucket->peers[i] = bucket->peers[bucket->peers_size - 1];
           GNUNET_array_grow (bucket->peers, bucket->peers_size,
                              bucket->peers_size - 1);
-         i--;
+          i--;
         }
     }
 }

Modified: GNUnet/src/applications/dht/tools/dhttest.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest.c 2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/dht/tools/dhttest.c 2007-12-15 10:15:16 UTC (rev 
5912)
@@ -118,25 +118,25 @@
                                                 buf);
       /* wait for some DHT's to find each other! */
       sock = GNUNET_client_connection_create (NULL, cfg);
-      left = 30;                    /* how many iterations should we wait? */
+      left = 30;                /* how many iterations should we wait? */
       while (GNUNET_OK ==
-            GNUNET_STATS_get_statistics (NULL, sock, &waitForConnect, NULL))
-       {
-         printf ("Waiting for peer to DHT-connect (%u iterations left)...\n",
-                 left);
-         sleep (5);
-         left--;
-         if (left == 0)
-           break;
-       }
+             GNUNET_STATS_get_statistics (NULL, sock, &waitForConnect, NULL))
+        {
+          printf ("Waiting for peer to DHT-connect (%u iterations left)...\n",
+                  left);
+          sleep (5);
+          left--;
+          if (left == 0)
+            break;
+        }
       GNUNET_client_connection_destroy (sock);
       if (ok == 0)
-       {
-         GNUNET_TESTING_stop_daemons (peers);
-         fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
-         GNUNET_GC_free (cfg);
-         return -1;
-       }
+        {
+          GNUNET_TESTING_stop_daemons (peers);
+          fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
+          GNUNET_GC_free (cfg);
+          return -1;
+        }
 
       GNUNET_hash (buf, 4, &key);
       value = GNUNET_malloc (8);
@@ -147,7 +147,7 @@
                                           &key,
                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
                                           value));
-      GNUNET_free(value);
+      GNUNET_free (value);
     }
 
   /* get loop */
@@ -156,39 +156,36 @@
     {
       GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + i * 10);
       GNUNET_GC_set_configuration_value_string (cfg,
-                                               ectx, "NETWORK", "HOST",
-                                               buf);
+                                                ectx, "NETWORK", "HOST", buf);
       for (j = 0; j < NUM_PEERS; j++)
-       {
-         GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + j * 10);
-         GNUNET_hash (buf, 4, &key);
-         fprintf (stderr, "Peer %d gets key %d", i, j);
-         for (k = 0; k < NUM_ROUNDS; k++)
-             {
-               fprintf (stderr, ".");
-               if (0 < GNUNET_DHT_get (cfg,
-                                       ectx,
-                                       GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                       &key,
-                                       15 * GNUNET_CRON_SECONDS,
-                                       NULL, NULL))
-                 break;
-             }
-         if (k < NUM_ROUNDS)
-           {
-             fprintf (stderr, "!\n");
-             found++;
-           }
-         else
-           {
-             fprintf (stderr, "?\n");
-           }
+        {
+          GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + j * 10);
+          GNUNET_hash (buf, 4, &key);
+          fprintf (stderr, "Peer %d gets key %d", i, j);
+          for (k = 0; k < NUM_ROUNDS; k++)
+            {
+              fprintf (stderr, ".");
+              if (0 < GNUNET_DHT_get (cfg,
+                                      ectx,
+                                      GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                      &key,
+                                      15 * GNUNET_CRON_SECONDS, NULL, NULL))
+                break;
+            }
+          if (k < NUM_ROUNDS)
+            {
+              fprintf (stderr, "!\n");
+              found++;
+            }
+          else
+            {
+              fprintf (stderr, "?\n");
+            }
         }
     }
   /* end of actual test code */
   fprintf (stderr,
-          "Found %u out of %u attempts.\n",
-          found, NUM_PEERS * NUM_PEERS);
+           "Found %u out of %u attempts.\n", found, NUM_PEERS * NUM_PEERS);
 FAILURE:
   GNUNET_TESTING_stop_daemons (peers);
   GNUNET_GC_free (cfg);

Modified: GNUnet/src/applications/dht/tools/dhttest2.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-15 10:15:06 UTC 
(rev 5911)
+++ GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-15 10:15:16 UTC 
(rev 5912)
@@ -192,7 +192,7 @@
   left = 10;
   do
     {
-      fprintf(stderr, ".");
+      fprintf (stderr, ".");
       if (1 == GNUNET_DHT_get (cfg,
                                ectx,
                                GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
@@ -201,7 +201,7 @@
       left--;
     }
   while (left > 0);
-  fprintf(stderr, left > 0 ? "!\n" : "?\n");
+  fprintf (stderr, left > 0 ? "!\n" : "?\n");
 
   CHECK (left > 0);
   /* switch to peer1 */
@@ -213,7 +213,7 @@
   left = 10;
   do
     {
-      fprintf(stderr, ".");
+      fprintf (stderr, ".");
       if (1 == GNUNET_DHT_get (cfg,
                                ectx,
                                GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
@@ -222,7 +222,7 @@
       left--;
     }
   while (left > 0);
-  fprintf(stderr, left > 0 ? "!\n" : "?\n");
+  fprintf (stderr, left > 0 ? "!\n" : "?\n");
   CHECK (left > 0);
   /* end of actual test code */
 

Modified: GNUnet/src/applications/fragmentation/fragmentationtest.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentationtest.c   2007-12-15 
10:15:06 UTC (rev 5911)
+++ GNUnet/src/applications/fragmentation/fragmentationtest.c   2007-12-15 
10:15:16 UTC (rev 5912)
@@ -368,14 +368,14 @@
 
 static int
 p2p_register_handler (const unsigned short type,
-                                  GNUNET_P2PRequestHandler callback)
+                      GNUNET_P2PRequestHandler callback)
 {
   return GNUNET_OK;
 }
 
 static int
 p2p_unregister_handler (const unsigned short type,
-                                    GNUNET_P2PRequestHandler callback)
+                        GNUNET_P2PRequestHandler callback)
 {
   return GNUNET_OK;
 }

Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/pingpong/pingpong.c 2007-12-15 10:15:16 UTC (rev 
5912)
@@ -167,7 +167,7 @@
 
 static int
 connection_send_plaintext (const GNUNET_PeerIdentity * peer,
-                          const P2P_pingpong_MESSAGE * msg)
+                           const P2P_pingpong_MESSAGE * msg)
 {
   GNUNET_TSession *mytsession;
   int ret;
@@ -470,8 +470,7 @@
     {
       if (GNUNET_OK !=
           connection_send_plaintext (receiver,
-                                                 (const P2P_pingpong_MESSAGE
-                                                  *) pmsg))
+                                     (const P2P_pingpong_MESSAGE *) pmsg))
         {
           GNUNET_free (pmsg);
           return GNUNET_SYSERR;

Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c   2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/testbed/testbed.c   2007-12-15 10:15:16 UTC (rev 
5912)
@@ -160,8 +160,7 @@
       coreAPI->cs_send_to_client (client, &reply->header.header);
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
-                     "%s: returning from cs_send_to_client\n",
-                     __FUNCTION__);
+                     "%s: returning from cs_send_to_client\n", __FUNCTION__);
       GNUNET_free (helo);
       GNUNET_free (reply);
     }
@@ -1414,8 +1413,7 @@
   GNUNET_GE_ASSERT (ectx,
                     GNUNET_SYSERR !=
                     capi->
-                    cs_exit_handler_register
-                    (&testbedClientExitHandler));
+                    cs_exit_handler_register (&testbedClientExitHandler));
   GNUNET_GE_ASSERT (ectx,
                     GNUNET_SYSERR !=
                     capi->

Modified: GNUnet/src/applications/tracekit/tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.c 2007-12-15 10:15:06 UTC (rev 
5911)
+++ GNUnet/src/applications/tracekit/tracekit.c 2007-12-15 10:15:16 UTC (rev 
5912)
@@ -55,7 +55,7 @@
 handlep2pReply (const GNUNET_PeerIdentity * sender,
                 const GNUNET_MessageHeader * message)
 {
-  struct RTE * rte;
+  struct RTE *rte;
   unsigned int i;
   unsigned int hostCount;
   const P2P_tracekit_reply_MESSAGE *reply;
@@ -93,15 +93,13 @@
            (GNUNET_Int32Time) ntohl (reply->initiatorTimestamp))
           && (0 ==
               memcmp (&rte->initiator,
-                      &reply->initiatorId,
-                      sizeof (GNUNET_HashCode))))
+                      &reply->initiatorId, sizeof (GNUNET_HashCode))))
         {
           GNUNET_GE_LOG (ectx,
                          GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                          "TRACEKIT: found matching entry in routing table\n");
           if (0 == memcmp (coreAPI->myIdentity,
-                           &rte->replyTo,
-                           sizeof (GNUNET_HashCode)))
+                           &rte->replyTo, sizeof (GNUNET_HashCode)))
             {
               idx = ntohl (reply->clientId);
               GNUNET_GE_LOG (ectx,
@@ -128,12 +126,11 @@
               /* build msg */
               csReply->header.size
                 = htons (sizeof (CS_tracekit_reply_MESSAGE) +
-                        hostCount * sizeof (GNUNET_PeerIdentity));
+                         hostCount * sizeof (GNUNET_PeerIdentity));
               csReply->header.type = htons (GNUNET_CS_PROTO_TRACEKIT_REPLY);
               csReply->responderId = reply->responderId;
               memcpy (&csReply[1],
-                      &reply[1],
-                     hostCount * sizeof (GNUNET_PeerIdentity));
+                      &reply[1], hostCount * sizeof (GNUNET_PeerIdentity));
               coreAPI->cs_send_to_client (clients[idx],
                                           &csReply->header, GNUNET_YES);
               GNUNET_free (csReply);
@@ -145,8 +142,7 @@
                              GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
                              GNUNET_GE_USER,
                              "TRACEKIT: forwarding to next hop `%s'\n", &hop);
-              coreAPI->unicast (&rte->replyTo, message,
-                                rte->priority, 0);
+              coreAPI->unicast (&rte->replyTo, message, rte->priority, 0);
             }
         }
     }
@@ -201,7 +197,7 @@
   GNUNET_EncName init;
   GNUNET_EncName sen;
   GNUNET_Int32Time now;
-  struct RTE * rte;
+  struct RTE *rte;
 
   GNUNET_hash_to_enc (&sender->hashPubKey, &sen);
   if (ntohs (message->size) != sizeof (P2P_tracekit_probe_MESSAGE))
@@ -231,10 +227,9 @@
   for (i = 0; i < MAXROUTE; i++)
     {
       rte = &routeTable[i];
-      if ( (rte->timestamp == ntohl (msg->timestamp))
-          && 0 == memcmp (&rte->initiator,
-                          &msg->initiatorId,
-                          sizeof (GNUNET_HashCode)))
+      if ((rte->timestamp == ntohl (msg->timestamp))
+          && 0 == memcmp (&rte->initiator,
+                          &msg->initiatorId, sizeof (GNUNET_HashCode)))
         {
           GNUNET_GE_LOG (ectx,
                          GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,

Modified: GNUnet/src/transports/test.c
===================================================================
--- GNUnet/src/transports/test.c        2007-12-15 10:15:06 UTC (rev 5911)
+++ GNUnet/src/transports/test.c        2007-12-15 10:15:16 UTC (rev 5912)
@@ -249,9 +249,8 @@
   api.myIdentity = &me;
   api.receive = &receive;
   api.request_service = &request_service;
-  api.release_service = NULL;       /* not needed */
-  api.connection_assert_tsession_unused =
-    &connection_assert_tsession_unused;
+  api.release_service = NULL;   /* not needed */
+  api.connection_assert_tsession_unused = &connection_assert_tsession_unused;
   GNUNET_cron_start (api.cron);
   res = GNUNET_OK;
   transport = init (&api);

Modified: GNUnet/src/transports/test_repeat.c
===================================================================
--- GNUnet/src/transports/test_repeat.c 2007-12-15 10:15:06 UTC (rev 5911)
+++ GNUnet/src/transports/test_repeat.c 2007-12-15 10:15:16 UTC (rev 5912)
@@ -252,9 +252,8 @@
   api.myIdentity = &me;
   api.receive = &receive;
   api.request_service = &request_service;
-  api.release_service = NULL;       /* not needed */
-  api.connection_assert_tsession_unused =
-    &connection_assert_tsession_unused;
+  api.release_service = NULL;   /* not needed */
+  api.connection_assert_tsession_unused = &connection_assert_tsession_unused;
   GNUNET_cron_start (api.cron);
   res = GNUNET_OK;
   transport = init (&api);





reply via email to

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