gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r16833 - in gnunet/src: datastore dht fs include mesh peeri


From: gnunet
Subject: [GNUnet-SVN] r16833 - in gnunet/src: datastore dht fs include mesh peerinfo-tool testing topology transport transport/wlan vpn
Date: Wed, 14 Sep 2011 13:59:46 +0200

Author: grothoff
Date: 2011-09-14 13:59:46 +0200 (Wed, 14 Sep 2011)
New Revision: 16833

Modified:
   gnunet/src/datastore/plugin_datastore_sqlite.c
   gnunet/src/dht/gnunet-dht-driver.c
   gnunet/src/dht/gnunet-service-dht.c
   gnunet/src/dht/test_dht_twopeer_get_put.c
   gnunet/src/fs/fs_test_lib.c
   gnunet/src/fs/fs_test_lib.h
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/fs/test_fs_test_lib.c
   gnunet/src/fs/test_gnunet_service_fs_migration.c
   gnunet/src/fs/test_gnunet_service_fs_p2p.c
   gnunet/src/include/gnunet_mesh_service_new.h
   gnunet/src/include/gnunet_transport_service.h
   gnunet/src/mesh/gnunet-service-mesh.c
   gnunet/src/mesh/mesh_api.c
   gnunet/src/mesh/mesh_api_new.c
   gnunet/src/mesh/test_mesh_local_1.c
   gnunet/src/mesh/test_mesh_local_2.c
   gnunet/src/peerinfo-tool/gnunet-peerinfo.c
   gnunet/src/testing/test_testing_connect.c
   gnunet/src/testing/test_testing_reconnect.c
   gnunet/src/testing/testing.c
   gnunet/src/testing/testing_group.c
   gnunet/src/topology/test_gnunet_daemon_topology.c
   gnunet/src/transport/gnunet-service-transport_neighbours.c
   gnunet/src/transport/gnunet-transport-wlan-helper.c
   gnunet/src/transport/plugin_transport_wlan.c
   gnunet/src/transport/test_plugin_transport_wlan_dummy.c
   gnunet/src/transport/test_transport_api_limited_sockets.c
   gnunet/src/transport/transport_api_address_lookup.c
   gnunet/src/transport/transport_api_peer_address_lookup.c
   gnunet/src/transport/wlan/helper_common.c
   gnunet/src/vpn/gnunet-daemon-vpn-helper.c
   gnunet/src/vpn/gnunet-service-dns.c
Log:
indentation

Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c      2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c      2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -326,15 +326,12 @@
       (sq_prepare
        (plugin->dbh,
         "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ "
-        "FROM gn090 INDEXED BY idx_repl_rvalue " 
-       "WHERE repl=?2 AND "
+        "FROM gn090 INDEXED BY idx_repl_rvalue WHERE repl=?2 AND "
         " (rvalue>=?1 OR "
         "  NOT EXISTS (SELECT 1 FROM gn090 INDEXED BY idx_repl_rvalue WHERE 
repl=?2 AND rvalue>=?1 LIMIT 1) ) "
-        "ORDER BY rvalue ASC LIMIT 1",
-        &plugin->selRepl) != SQLITE_OK) ||
+        "ORDER BY rvalue ASC LIMIT 1", &plugin->selRepl) != SQLITE_OK) ||
       (sq_prepare
-       (plugin->dbh,
-        "SELECT MAX(repl) FROM gn090 INDEXED BY idx_repl_rvalue",
+       (plugin->dbh, "SELECT MAX(repl) FROM gn090 INDEXED BY idx_repl_rvalue",
         &plugin->maxRepl) != SQLITE_OK) ||
       (sq_prepare
        (plugin->dbh,
@@ -355,8 +352,7 @@
         "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
         &plugin->insertContent) != SQLITE_OK) ||
       (sq_prepare
-       (plugin->dbh, 
-       "DELETE FROM gn090 WHERE _ROWID_ = ?",
+       (plugin->dbh, "DELETE FROM gn090 WHERE _ROWID_ = ?",
         &plugin->delRow) != SQLITE_OK))
   {
     LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "precompiling");

Modified: gnunet/src/dht/gnunet-dht-driver.c
===================================================================
--- gnunet/src/dht/gnunet-dht-driver.c  2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/dht/gnunet-dht-driver.c  2011-09-14 11:59:46 UTC (rev 16833)
@@ -1407,23 +1407,12 @@
 }
 
 static void
-did_connect (void *cls, 
-            const struct
-            GNUNET_PeerIdentity * first,
-            const struct
-            GNUNET_PeerIdentity * second,
-            uint32_t distance,
-            const struct
-            GNUNET_CONFIGURATION_Handle *
-            first_cfg,
-            const struct
-            GNUNET_CONFIGURATION_Handle *
-            second_cfg,
-            struct GNUNET_TESTING_Daemon *
-            first_daemon,
-            struct GNUNET_TESTING_Daemon *
-            second_daemon,
-            const char *emsg)
+did_connect (void *cls, const struct GNUNET_PeerIdentity *first,
+             const struct GNUNET_PeerIdentity *second, uint32_t distance,
+             const struct GNUNET_CONFIGURATION_Handle *first_cfg,
+             const struct GNUNET_CONFIGURATION_Handle *second_cfg,
+             struct GNUNET_TESTING_Daemon *first_daemon,
+             struct GNUNET_TESTING_Daemon *second_daemon, const char *emsg)
 {
   struct FindPeerContext *find_peer_context = cls;
 
@@ -1457,7 +1446,8 @@
     d1 = GNUNET_TESTING_daemon_get_by_id (pg, &peer_count->peer_id);
     GNUNET_assert (d1 != NULL);
     d2 = d1;
-    while ((d2 == d1) || (GNUNET_YES != GNUNET_TESTING_test_daemon_running 
(d2)))
+    while ((d2 == d1) ||
+           (GNUNET_YES != GNUNET_TESTING_test_daemon_running (d2)))
     {
       d2 = GNUNET_TESTING_daemon_get (pg,
                                       GNUNET_CRYPTO_random_u32
@@ -1479,10 +1469,10 @@
     }
     if (NULL != find_peer_context->cc)
       GNUNET_TESTING_daemons_connect_cancel (find_peer_context->cc);
-    find_peer_context->cc = GNUNET_TESTING_daemons_connect (d1, d2, timeout, 
DEFAULT_RECONNECT_ATTEMPTS,
-                                                           GNUNET_YES, 
-                                                           &did_connect, 
-                                                           find_peer_context);
+    find_peer_context->cc =
+        GNUNET_TESTING_daemons_connect (d1, d2, timeout,
+                                        DEFAULT_RECONNECT_ATTEMPTS, GNUNET_YES,
+                                        &did_connect, find_peer_context);
   }
   if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).rel_value
       > 0)
@@ -1602,7 +1592,7 @@
       GNUNET_CONTAINER_multihashmap_destroy (find_peer_context->peer_hash);
       GNUNET_CONTAINER_heap_destroy (find_peer_context->peer_min_heap);
       if (NULL != find_peer_context->cc)
-       GNUNET_TESTING_daemons_connect_cancel (find_peer_context->cc);
+        GNUNET_TESTING_daemons_connect_cancel (find_peer_context->cc);
       GNUNET_free (find_peer_context);
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   "Churn round %u of %llu finished, scheduling next GET 
round.\n",
@@ -2120,7 +2110,7 @@
   /* Set this here in case we are re-running gets */
   test_get->succeeded = GNUNET_NO;
 
-  if (GNUNET_YES != GNUNET_TESTING_test_daemon_running (test_get->daemon))   
/* If the peer has been churned off, don't try issuing request from it! */
+  if (GNUNET_YES != GNUNET_TESTING_test_daemon_running (test_get->daemon))     
 /* If the peer has been churned off, don't try issuing request from it! */
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Peer we should issue get request from is down, skipping.\n");
@@ -2237,7 +2227,7 @@
   if (test_put == NULL)
     return;                     /* End of list */
 
-  if (GNUNET_YES != GNUNET_TESTING_test_daemon_running (test_put->daemon))   
/* If the peer has been churned off, don't try issuing request from it! */
+  if (GNUNET_YES != GNUNET_TESTING_test_daemon_running (test_put->daemon))     
 /* If the peer has been churned off, don't try issuing request from it! */
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Peer we should issue put request at is down, skipping.\n");
@@ -2357,7 +2347,7 @@
       GNUNET_CONTAINER_multihashmap_destroy (find_peer_context->peer_hash);
       GNUNET_CONTAINER_heap_destroy (find_peer_context->peer_min_heap);
       if (NULL != find_peer_context->cc)
-       GNUNET_TESTING_daemons_connect_cancel (find_peer_context->cc);
+        GNUNET_TESTING_daemons_connect_cancel (find_peer_context->cc);
       GNUNET_free (find_peer_context);
       fprintf (stderr, "Not sending any more find peer requests.\n");
 

Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/dht/gnunet-service-dht.c 2011-09-14 11:59:46 UTC (rev 16833)
@@ -858,10 +858,9 @@
  * @param std_dev standard deviation for the estimate
  *
  */
-static void 
-update_network_size_estimate (void *cls,
-                             struct GNUNET_TIME_Absolute timestamp,
-                             double logestimate, double std_dev)
+static void
+update_network_size_estimate (void *cls, struct GNUNET_TIME_Absolute timestamp,
+                              double logestimate, double std_dev)
 {
   log_of_network_size_estimate = logestimate;
 }
@@ -947,7 +946,7 @@
 {
   if (stats == NULL)
     return;
-  GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO);  
+  GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO);
 }
 
 
@@ -956,7 +955,7 @@
 {
   if (stats == NULL)
     return;
-  GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO);  
+  GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO);
 }
 
 
@@ -1630,8 +1629,7 @@
 static void
 process_pending_messages (struct ClientList *client)
 {
-  if ( (client->pending_head == NULL) ||
-       (client->transmit_handle != NULL) )
+  if ((client->pending_head == NULL) || (client->transmit_handle != NULL))
     return;
   client->transmit_handle =
       GNUNET_SERVER_notify_transmit_ready (client->client_handle,
@@ -2659,7 +2657,8 @@
 #endif
 
 //   GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 
"******************************************************** PUT 1\n");
-  record = GNUNET_CONTAINER_multihashmap_get(forward_list.hashmap, 
&msg_ctx->key);
+  record =
+      GNUNET_CONTAINER_multihashmap_get (forward_list.hashmap, &msg_ctx->key);
   if (NULL != record)
   {
     struct DHTRouteSource *pos;
@@ -2675,16 +2674,16 @@
       if (NULL == pos->client)
         continue;
 
-      gsize = data_size + sizeof(struct GNUNET_DHT_GetMessage);
-      gmsg = GNUNET_malloc(gsize);
-      gmsg->header.type = htons(GNUNET_MESSAGE_TYPE_DHT_GET_RESULT);
-      gmsg->header.size = htons(gsize);
+      gsize = data_size + sizeof (struct GNUNET_DHT_GetMessage);
+      gmsg = GNUNET_malloc (gsize);
+      gmsg->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_GET_RESULT);
+      gmsg->header.size = htons (gsize);
       gmsg->type = put_msg->type;
-      memcpy(&gmsg[1], &put_msg[1], data_size);
+      memcpy (&gmsg[1], &put_msg[1], data_size);
 
       /* TODO: duplicate and reverse order of path_history? */
       send_reply_to_client (pos->client, &gmsg->header, msg_ctx);
-      GNUNET_free(gmsg);
+      GNUNET_free (gmsg);
     }
   }
 //   GNUNET_log(GNUNET_ERROR_TYPE_ERROR, 
"******************************************************** PUT END\n");
@@ -2783,20 +2782,20 @@
   {
     if (hop_count == 0)
       return kademlia_replication;
-     if (hop_count < log_of_network_size_estimate * 2.0)
+    if (hop_count < log_of_network_size_estimate * 2.0)
       return 1;
     return 0;
   }
 
   if (hop_count > log_of_network_size_estimate * 2.0)
   {
-    if (GNUNET_YES == paper_forwarding) 
+    if (GNUNET_YES == paper_forwarding)
     {
       /* Once we have reached our ideal number of hops, don't stop forwarding! 
*/
       return 1;
     }
 #if DEBUG_DHT
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,               
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Hop count too high (est %f, lowest %d), NOT Forwarding 
request\n",
                 log_of_network_size_estimate * 2.0, lowest_bucket);
 #endif
@@ -2893,7 +2892,7 @@
     {
       if (strict_kademlia != GNUNET_YES)        /* Return that we at as close 
as any other peer */
         return GNUNET_YES;
-      if (distance (&pos->id.hashPubKey, target) < my_distance)    /* Check 
all known peers, only return if we are the true closest */
+      if (distance (&pos->id.hashPubKey, target) < my_distance) /* Check all 
known peers, only return if we are the true closest */
         return GNUNET_NO;
     }
     pos = pos->next;
@@ -2932,8 +2931,7 @@
   struct PeerInfo *chosen;
 
   /** If we are doing kademlia routing (saves some cycles) */
-  if ( (strict_kademlia == GNUNET_YES) ||
-       (hops >= log_of_network_size_estimate) )
+  if ((strict_kademlia == GNUNET_YES) || (hops >= 
log_of_network_size_estimate))
   {
     /* greedy selection (closest peer that is not in bloomfilter) */
     largest_distance = 0;
@@ -2964,7 +2962,7 @@
       GNUNET_CONTAINER_bloomfilter_add (bloom, &chosen->id.hashPubKey);
       return chosen;
     }
-    return NULL; /* no peer available or we are the closest */
+    return NULL;                /* no peer available or we are the closest */
   }
 
 
@@ -2986,14 +2984,13 @@
       pos = pos->next;
     }
   }
-  if (count == 0)      /* No peers to select from! */
+  if (count == 0)               /* No peers to select from! */
   {
     increment_stats ("# failed to select peer");
     return NULL;
   }
   /* Now actually choose a peer */
-  selected =
-      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, count);
+  selected = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, count);
   count = 0;
   for (bc = lowest_bucket; bc < MAX_BUCKETS; bc++)
   {
@@ -3007,7 +3004,7 @@
         continue;               /* Ignore bloomfiltered peers */
       }
       if (0 == selected--)
-       return pos;     
+        return pos;
       pos = pos->next;
     }
   }
@@ -3105,10 +3102,10 @@
     pos = record->head;
     while (pos != NULL)
     {
-      if ( (NULL != msg_ctx->peer) &&
-          (0 ==
-           memcmp (msg_ctx->peer, &pos->source,
-                   sizeof (struct GNUNET_PeerIdentity))) )
+      if ((NULL != msg_ctx->peer) &&
+          (0 ==
+           memcmp (msg_ctx->peer, &pos->source,
+                   sizeof (struct GNUNET_PeerIdentity))))
         break;                  /* Already have this peer in reply list! */
       pos = pos->next;
     }
@@ -3280,7 +3277,7 @@
     recent_req = GNUNET_CONTAINER_heap_peek (recent.minHeap);
     GNUNET_assert (recent_req != NULL);
     GNUNET_SCHEDULER_cancel (recent_req->remove_task);
-    recent_req->remove_task = 
+    recent_req->remove_task =
         GNUNET_SCHEDULER_add_now (&remove_recent, recent_req);
   }
 
@@ -3591,8 +3588,8 @@
               "%s:%s Sending malicious PUT message with hash %s\n", 
my_short_id,
               "DHT", GNUNET_h2s (&key));
   demultiplex_message (&put_message.header, &msg_ctx);
-  GNUNET_SCHEDULER_add_delayed (malicious_put_frequency, 
-                               &malicious_put_task, NULL);
+  GNUNET_SCHEDULER_add_delayed (malicious_put_frequency, &malicious_put_task,
+                                NULL);
 }
 
 
@@ -3639,8 +3636,8 @@
               "%s:%s Sending malicious GET message with hash %s\n", 
my_short_id,
               "DHT", GNUNET_h2s (&key));
   demultiplex_message (&get_message.header, &msg_ctx);
-  GNUNET_SCHEDULER_add_delayed (malicious_get_frequency,
-                               &malicious_get_task, NULL);
+  GNUNET_SCHEDULER_add_delayed (malicious_get_frequency, &malicious_get_task,
+                                NULL);
 }
 #endif
 
@@ -3811,7 +3808,7 @@
     msg_ctx.path_history_len = 1;
   }
   msg_ctx.network_size = log_of_network_size_estimate;
-  msg_ctx.peer = &my_identity; /* FIXME bart NULL? Fix doxygen? */
+  msg_ctx.peer = &my_identity;  /* FIXME bart NULL? Fix doxygen? */
   msg_ctx.importance = DHT_DEFAULT_P2P_IMPORTANCE + 4;  /* Make local routing 
a higher priority */
   msg_ctx.timeout = DHT_DEFAULT_P2P_TIMEOUT;
 
@@ -4066,10 +4063,10 @@
         ntohl (incoming->outgoing_path_length) *
         sizeof (struct GNUNET_PeerIdentity);
     if (ntohs (message->size) !=
-          (sizeof (struct GNUNET_DHT_P2PRouteMessage) +
-          ntohs (enc_msg->size) + path_size))
+        (sizeof (struct GNUNET_DHT_P2PRouteMessage) + ntohs (enc_msg->size) +
+         path_size))
     {
-      GNUNET_break_op(0);
+      GNUNET_break_op (0);
       return GNUNET_YES;
     }
     route_path = (char *) &incoming[1];
@@ -4524,8 +4521,7 @@
   datacache = GNUNET_DATACACHE_create (cfg, "dhtcache");
   GNUNET_SERVER_add_handlers (server, plugin_handlers);
   GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
-  nse = GNUNET_NSE_connect (cfg,
-                           &update_network_size_estimate, NULL);
+  nse = GNUNET_NSE_connect (cfg, &update_network_size_estimate, NULL);
   coreAPI = GNUNET_CORE_connect (cfg,   /* Main configuration */
                                  DEFAULT_CORE_QUEUE_SIZE,       /* queue size 
*/
                                  NULL,  /* Closure passed to DHT functions */
@@ -4587,8 +4583,8 @@
     malicious_getter = GNUNET_YES;
     if (GNUNET_NO ==
         GNUNET_CONFIGURATION_get_value_time (cfg, "DHT",
-                                            "MALICIOUS_GET_FREQUENCY",
-                                            &malicious_get_frequency))
+                                             "MALICIOUS_GET_FREQUENCY",
+                                             &malicious_get_frequency))
       malicious_get_frequency = DEFAULT_MALICIOUS_GET_FREQUENCY;
   }
 
@@ -4598,8 +4594,8 @@
     malicious_putter = GNUNET_YES;
     if (GNUNET_NO ==
         GNUNET_CONFIGURATION_get_value_time (cfg, "DHT",
-                                            "MALICIOUS_PUT_FREQUENCY",
-                                            &malicious_put_frequency))
+                                             "MALICIOUS_PUT_FREQUENCY",
+                                             &malicious_put_frequency))
       malicious_put_frequency = DEFAULT_MALICIOUS_PUT_FREQUENCY;
   }
 
@@ -4721,7 +4717,8 @@
   int ret;
 
   recent.hashmap = GNUNET_CONTAINER_multihashmap_create (DHT_MAX_RECENT / 2);
-  recent.minHeap = GNUNET_CONTAINER_heap_create 
(GNUNET_CONTAINER_HEAP_ORDER_MIN);
+  recent.minHeap =
+      GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
   recent_find_peer_requests =
       GNUNET_CONTAINER_multihashmap_create (MAX_BUCKETS / 8);
   ret =
@@ -4730,12 +4727,12 @@
                            NULL)) ? 0 : 1;
   GNUNET_assert (0 == GNUNET_CONTAINER_multihashmap_size (recent.hashmap));
   GNUNET_CONTAINER_multihashmap_destroy (recent.hashmap);
-  recent.hashmap = NULL;  
+  recent.hashmap = NULL;
   GNUNET_assert (0 == GNUNET_CONTAINER_heap_get_size (recent.minHeap));
   GNUNET_CONTAINER_heap_destroy (recent.minHeap);
   recent.minHeap = NULL;
   GNUNET_CONTAINER_multihashmap_destroy (recent_find_peer_requests);
-  recent_find_peer_requests = NULL;  
+  recent_find_peer_requests = NULL;
   return ret;
 }
 

Modified: gnunet/src/dht/test_dht_twopeer_get_put.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer_get_put.c   2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/dht/test_dht_twopeer_get_put.c   2011-09-14 11:59:46 UTC (rev 
16833)
@@ -30,7 +30,7 @@
  * "straight line" topology.  On notification that all peers have
  * been properly connected, calls the do_get function which initiates
  * a GNUNET_DHT_get from the *second* peer. Once the GNUNET_DHT_get
- * function starts, runs the do_put function to insert data at the first peer. 
 
+ * function starts, runs the do_put function to insert data at the first peer.
  *   If the GET is successful, schedules finish_testing
  * to stop the test and shut down peers.  If GET is unsuccessful
  * after GET_TIMEOUT seconds, prints an error message and shuts down

Modified: gnunet/src/fs/fs_test_lib.c
===================================================================
--- gnunet/src/fs/fs_test_lib.c 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/fs/fs_test_lib.c 2011-09-14 11:59:46 UTC (rev 16833)
@@ -445,9 +445,10 @@
   ncc = GNUNET_malloc (sizeof (struct GNUNET_FS_TEST_ConnectContext));
   ncc->cont = cont;
   ncc->cont_cls = cont_cls;
-  ncc->cc = GNUNET_TESTING_daemons_connect (daemon1->daemon, daemon2->daemon, 
timeout,
-                                           CONNECT_ATTEMPTS, GNUNET_YES,
-                                           &notify_connection, ncc);
+  ncc->cc =
+      GNUNET_TESTING_daemons_connect (daemon1->daemon, daemon2->daemon, 
timeout,
+                                      CONNECT_ATTEMPTS, GNUNET_YES,
+                                      &notify_connection, ncc);
   return ncc;
 }
 

Modified: gnunet/src/fs/fs_test_lib.h
===================================================================
--- gnunet/src/fs/fs_test_lib.h 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/fs/fs_test_lib.h 2011-09-14 11:59:46 UTC (rev 16833)
@@ -87,7 +87,8 @@
  * @param cc operation to cancel
  */
 void
-GNUNET_FS_TEST_daemons_connect_cancel (struct GNUNET_FS_TEST_ConnectContext 
*cc);
+GNUNET_FS_TEST_daemons_connect_cancel (struct GNUNET_FS_TEST_ConnectContext
+                                       *cc);
 
 
 /**

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2011-09-14 11:59:46 UTC (rev 
16833)
@@ -336,11 +336,12 @@
   if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR)
   {
     static int once;
-    if (! once)
-      {
-       once = 1;
-       GNUNET_break (0);
-      }
+
+    if (!once)
+    {
+      once = 1;
+      GNUNET_break (0);
+    }
     /* how can we not have latency data? */
     return GNUNET_TIME_UNIT_SECONDS;
   }

Modified: gnunet/src/fs/test_fs_test_lib.c
===================================================================
--- gnunet/src/fs/test_fs_test_lib.c    2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/fs/test_fs_test_lib.c    2011-09-14 11:59:46 UTC (rev 16833)
@@ -52,10 +52,10 @@
 do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (NULL != cc)
-    {
-      GNUNET_FS_TEST_daemons_connect_cancel (cc);
-      cc = NULL;
-    }
+  {
+    GNUNET_FS_TEST_daemons_connect_cancel (cc);
+    cc = NULL;
+  }
   if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
   {
     GNUNET_break (0);
@@ -117,8 +117,8 @@
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Daemons started, will now try to connect them\n");
-  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, 
&do_publish,
-                                      NULL);
+  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT,
+                                       &do_publish, NULL);
 }
 
 

Modified: gnunet/src/fs/test_gnunet_service_fs_migration.c
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_migration.c    2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/fs/test_gnunet_service_fs_migration.c    2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -59,12 +59,12 @@
 {
   struct GNUNET_TIME_Relative del;
   char *fancy;
-  
+
   if (NULL != cc)
-    {
-      GNUNET_FS_TEST_daemons_connect_cancel (cc);
-      cc = NULL;
-    }
+  {
+    GNUNET_FS_TEST_daemons_connect_cancel (cc);
+    cc = NULL;
+  }
   GNUNET_FS_TEST_daemons_stop (2, daemons);
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
   {
@@ -173,8 +173,8 @@
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Daemons started, will now try to connect them\n");
-  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, 
&do_publish,
-                                      NULL);
+  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT,
+                                       &do_publish, NULL);
 }
 
 

Modified: gnunet/src/fs/test_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/test_gnunet_service_fs_p2p.c  2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/fs/test_gnunet_service_fs_p2p.c  2011-09-14 11:59:46 UTC (rev 
16833)
@@ -57,10 +57,10 @@
   char *fancy;
 
   if (NULL != cc)
-    {
-      GNUNET_FS_TEST_daemons_connect_cancel (cc);
-      cc = NULL;
-    }
+  {
+    GNUNET_FS_TEST_daemons_connect_cancel (cc);
+    cc = NULL;
+  }
   GNUNET_FS_TEST_daemons_stop (NUM_DAEMONS, daemons);
   if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE))
   {
@@ -128,8 +128,8 @@
   GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_PREREQ_DONE));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Daemons started, will now try to connect them\n");
-  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT, 
&do_publish,
-                                      NULL);
+  cc = GNUNET_FS_TEST_daemons_connect (daemons[0], daemons[1], TIMEOUT,
+                                       &do_publish, NULL);
 }
 
 

Modified: gnunet/src/include/gnunet_mesh_service_new.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service_new.h        2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/include/gnunet_mesh_service_new.h        2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -116,11 +116,16 @@
  * @return initial tunnel context for the tunnel
  *         (can be NULL -- that's not an error)
  */
-typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) (
-    void *cls,
-    struct GNUNET_MESH_Tunnel * tunnel,
-    const struct GNUNET_PeerIdentity * initiator,
-    const struct GNUNET_TRANSPORT_ATS_Information * atsi);
+typedef void *(GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
+                                                              struct
+                                                              
GNUNET_MESH_Tunnel
+                                                              * tunnel,
+                                                              const struct
+                                                              
GNUNET_PeerIdentity
+                                                              * initiator,
+                                                              const struct
+                                                              
GNUNET_TRANSPORT_ATS_Information
+                                                              * atsi);
 
 
 /**
@@ -164,8 +169,7 @@
  */
 struct GNUNET_MESH_Handle *
 GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                     unsigned int queue_size,
-                     void *cls,
+                     unsigned int queue_size, void *cls,
                      GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel,
                      GNUNET_MESH_TunnelEndHandler cleaner,
                      const struct GNUNET_MESH_MessageHandler *handlers,
@@ -187,9 +191,9 @@
  * @param cls closure
  * @param peer peer identity the tunnel stopped working with
  */
-typedef void (*GNUNET_MESH_PeerDisconnectHandler) (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer);
+typedef void (*GNUNET_MESH_PeerDisconnectHandler) (void *cls,
+                                                   const struct
+                                                   GNUNET_PeerIdentity * peer);
 
 
 /**
@@ -200,10 +204,12 @@
  * @param peer peer identity the tunnel was created to, NULL on timeout
  * @param atsi performance data for the connection
  */
-typedef void (*GNUNET_MESH_PeerConnectHandler) (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer,
-    const struct GNUNET_TRANSPORT_ATS_Information * atsi);
+typedef void (*GNUNET_MESH_PeerConnectHandler) (void *cls,
+                                                const struct 
GNUNET_PeerIdentity
+                                                * peer,
+                                                const struct
+                                                
GNUNET_TRANSPORT_ATS_Information
+                                                * atsi);
 
 
 
@@ -218,8 +224,7 @@
  * @param handler_cls closure for connect/disconnect handlers
  */
 struct GNUNET_MESH_Tunnel *
-GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, 
-                           void *tunnel_ctx,
+GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void *tunnel_ctx,
                            GNUNET_MESH_PeerConnectHandler connect_handler,
                            GNUNET_MESH_PeerDisconnectHandler 
disconnect_handler,
                            void *handler_cls);
@@ -297,8 +302,7 @@
  *         memory); if NULL is returned, "notify" will NOT be called.
  */
 struct GNUNET_MESH_TransmitHandle *
-GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel,
-                                   int cork,
+GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
                                    uint32_t priority,
                                    struct GNUNET_TIME_Relative maxdelay,
                                    const struct GNUNET_PeerIdentity *target,

Modified: gnunet/src/include/gnunet_transport_service.h
===================================================================
--- gnunet/src/include/gnunet_transport_service.h       2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/include/gnunet_transport_service.h       2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -638,7 +638,7 @@
 
 /**
  * Handle to cancel a pending address lookup.
- */ 
+ */
 struct GNUNET_TRANSPORT_AddressLookupContext;
 
 
@@ -671,12 +671,14 @@
  * @param alc handle for the request to cancel
  */
 void
-GNUNET_TRANSPORT_address_lookup_cancel (struct 
GNUNET_TRANSPORT_AddressLookupContext *alc);
+GNUNET_TRANSPORT_address_lookup_cancel (struct
+                                        GNUNET_TRANSPORT_AddressLookupContext
+                                        *alc);
 
 
 /**
  * Handle to cancel a pending address lookup.
- */ 
+ */
 struct GNUNET_TRANSPORT_AddressLookupContext;
 
 
@@ -706,7 +708,9 @@
  * @param alc handle for the request to cancel
  */
 void
-GNUNET_TRANSPORT_peer_address_lookup_cancel (struct 
GNUNET_TRANSPORT_PeerAddressLookupContext *alc);
+GNUNET_TRANSPORT_peer_address_lookup_cancel (struct
+                                             
GNUNET_TRANSPORT_PeerAddressLookupContext
+                                             *alc);
 
 
 /**

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2011-09-14 11:59:46 UTC (rev 
16833)
@@ -661,8 +661,8 @@
 {
   GNUNET_HashCode hc;
 
-  GNUNET_CRYPTO_hash(&message_type, sizeof(uint16_t), &hc);
-  return GNUNET_CONTAINER_multihashmap_contains(c->types, &hc);
+  GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
+  return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
 }
 
 
@@ -817,9 +817,8 @@
 announce_application (void *cls, const GNUNET_HashCode * key, void *value)
 {
   /* FIXME are hashes in multihash map equal on all aquitectures? */
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "MESH:  putting in DHT %s\n",
-              GNUNET_h2s_full(key));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  putting in DHT %s\n",
+              GNUNET_h2s_full (key));
   GNUNET_DHT_put (dht_handle, key, 10U, GNUNET_DHT_RO_RECORD_ROUTE,
                   GNUNET_BLOCK_TYPE_TEST, sizeof (struct GNUNET_PeerIdentity),
                   (const char *) &my_full_id,
@@ -851,9 +850,8 @@
     return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Starting PUT for apps\n");
-  GNUNET_CONTAINER_multihashmap_iterate(applications,
-                                        &announce_application,
-                                        NULL);
+  GNUNET_CONTAINER_multihashmap_iterate (applications, &announce_application,
+                                         NULL);
   announce_applications_task =
       GNUNET_SCHEDULER_add_delayed (APP_ANNOUNCE_TIME, &announce_applications,
                                     cls);
@@ -884,7 +882,7 @@
                   &my_full_id.hashPubKey,       /* Key to use */
                   10U,          /* Replication level */
                   GNUNET_DHT_RO_RECORD_ROUTE,   /* DHT options */
-                  GNUNET_BLOCK_TYPE_TEST,        /* Block type */
+                  GNUNET_BLOCK_TYPE_TEST,       /* Block type */
                   0,            /* Size of the data */
                   NULL,         /* Data itself */
                   GNUNET_TIME_absolute_get_forever (),  /* Data expiration */
@@ -1682,7 +1680,7 @@
   }
 
   /* Message for us? */
-  if (0 == memcmp (&msg->oid, &my_full_id, sizeof(struct GNUNET_PeerIdentity)))
+  if (0 == memcmp (&msg->oid, &my_full_id, sizeof (struct 
GNUNET_PeerIdentity)))
   {
     struct GNUNET_MESH_PeerControl pc;
 
@@ -1772,7 +1770,7 @@
 static int
 deregister_app (void *cls, const GNUNET_HashCode * key, void *value)
 {
-  GNUNET_CONTAINER_multihashmap_remove(applications, key, value);
+  GNUNET_CONTAINER_multihashmap_remove (applications, key, value);
   return GNUNET_OK;
 }
 
@@ -1880,12 +1878,10 @@
     GNUNET_DHT_get_stop (peer_info->dhtget);
     GNUNET_PEER_resolve (peer_info->id, &pi);
     peer_info->dhtget = GNUNET_DHT_get_start (dht_handle,       /* handle */
-                                              GNUNET_TIME_UNIT_FOREVER_REL,
-                                              GNUNET_BLOCK_TYPE_TEST, /* type 
*/
-                                              &pi.hashPubKey, /*key to search 
*/
-                                              4,       /* replication level */
-                                              GNUNET_DHT_RO_RECORD_ROUTE,
-                                              NULL, /* bloom filter */
+                                              GNUNET_TIME_UNIT_FOREVER_REL, 
GNUNET_BLOCK_TYPE_TEST,     /* type */
+                                              &pi.hashPubKey,   /*key to 
search */
+                                              4,        /* replication level */
+                                              GNUNET_DHT_RO_RECORD_ROUTE, 
NULL, /* bloom filter */
                                               0,        /* mutator */
                                               NULL,     /* xquery */
                                               0,        /* xquery bits */
@@ -1966,7 +1962,7 @@
     return;
   }
   GNUNET_assert (NULL != t->client);
-  GNUNET_DHT_get_stop(t->client->dht_get_type);
+  GNUNET_DHT_get_stop (t->client->dht_get_type);
   t->client->dht_get_type = NULL;
   peer_info = get_peer_info (pi);
   GNUNET_CONTAINER_multihashmap_put (t->peers, &pi->hashPubKey, peer_info,
@@ -1976,13 +1972,9 @@
     /* we don't have a route to the peer, let's try a direct lookup */
     if (NULL == peer_info->dhtget)
     {
-      peer_info->dhtget = GNUNET_DHT_get_start (dht_handle, /* handle */
-                                                GNUNET_TIME_UNIT_FOREVER_REL,
-                                                GNUNET_BLOCK_TYPE_TEST,
-                                                &pi->hashPubKey,
-                                                10U,  /* replication level */
-                                                GNUNET_DHT_RO_RECORD_ROUTE,
-                                                NULL,   /* bloom filter */
+      peer_info->dhtget = GNUNET_DHT_get_start (dht_handle,     /* handle */
+                                                GNUNET_TIME_UNIT_FOREVER_REL, 
GNUNET_BLOCK_TYPE_TEST, &pi->hashPubKey, 10U,     /* replication level */
+                                                GNUNET_DHT_RO_RECORD_ROUTE, 
NULL,       /* bloom filter */
                                                 0,      /* mutator */
                                                 NULL,   /* xquery */
                                                 0,      /* xquery bits */
@@ -2050,8 +2042,7 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: matching client found\n");
     if (NULL != c->tunnels)
     {
-      GNUNET_CONTAINER_multihashmap_iterate (c->tunnels,
-                                             &delete_tunnel_entry,
+      GNUNET_CONTAINER_multihashmap_iterate (c->tunnels, &delete_tunnel_entry,
                                              c);
       GNUNET_CONTAINER_multihashmap_destroy (c->tunnels);
     }
@@ -2059,19 +2050,19 @@
     /* deregister clients applications */
     if (NULL != c->apps)
     {
-      GNUNET_CONTAINER_multihashmap_iterate(c->apps, &deregister_app, NULL);
-      GNUNET_CONTAINER_multihashmap_destroy(c->apps);
+      GNUNET_CONTAINER_multihashmap_iterate (c->apps, &deregister_app, NULL);
+      GNUNET_CONTAINER_multihashmap_destroy (c->apps);
     }
-    if (0 == GNUNET_CONTAINER_multihashmap_size(applications) &&
+    if (0 == GNUNET_CONTAINER_multihashmap_size (applications) &&
         GNUNET_SCHEDULER_NO_TASK != announce_applications_task)
     {
       GNUNET_SCHEDULER_cancel (announce_applications_task);
       announce_applications_task = GNUNET_SCHEDULER_NO_TASK;
     }
     if (NULL != c->types)
-      GNUNET_CONTAINER_multihashmap_destroy(c->types);
+      GNUNET_CONTAINER_multihashmap_destroy (c->types);
     if (NULL != c->dht_get_type)
-      GNUNET_DHT_get_stop(c->dht_get_type);
+      GNUNET_DHT_get_stop (c->dht_get_type);
     GNUNET_CONTAINER_DLL_remove (clients, clients_tail, c);
     next = c->next;
     GNUNET_free (c);
@@ -2126,27 +2117,21 @@
     GNUNET_MESH_ApplicationType at;
     GNUNET_HashCode hc;
 
-    c->apps = GNUNET_CONTAINER_multihashmap_create(napps);
+    c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
     for (i = 0; i < napps; i++)
     {
-      at = ntohl(a[i]);
-      GNUNET_CRYPTO_hash(&at, sizeof(at), &hc);
+      at = ntohl (a[i]);
+      GNUNET_CRYPTO_hash (&at, sizeof (at), &hc);
       /* store in clients hashmap */
-      GNUNET_CONTAINER_multihashmap_put(
-          c->apps,
-          &hc,
-          c,
-          GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      GNUNET_CONTAINER_multihashmap_put (c->apps, &hc, c,
+                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
       /* store in global hashmap, for announcements */
-      GNUNET_CONTAINER_multihashmap_put(
-          applications,
-          &hc,
-          c,
-          GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      GNUNET_CONTAINER_multihashmap_put (applications, &hc, c,
+                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
     }
     if (GNUNET_SCHEDULER_NO_TASK == announce_applications_task)
-      announce_applications_task = GNUNET_SCHEDULER_add_now (
-          &announce_applications, NULL);
+      announce_applications_task =
+          GNUNET_SCHEDULER_add_now (&announce_applications, NULL);
 
   }
   if (ntypes > 0)
@@ -2154,24 +2139,19 @@
     uint16_t u16;
     GNUNET_HashCode hc;
 
-    t = (uint16_t *) &a[napps];
-    c->types = GNUNET_CONTAINER_multihashmap_create(ntypes);
-    for (i =0; i < ntypes; i++)
+    t = (uint16_t *) & a[napps];
+    c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
+    for (i = 0; i < ntypes; i++)
     {
-      u16 = ntohs(t[i]);
-      GNUNET_CRYPTO_hash(&u16, sizeof(u16), &hc);
+      u16 = ntohs (t[i]);
+      GNUNET_CRYPTO_hash (&u16, sizeof (u16), &hc);
+
       /* store in clients hashmap */
-      GNUNET_CONTAINER_multihashmap_put(
-          c->types,
-          &hc,
-          c,
-          GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      GNUNET_CONTAINER_multihashmap_put (c->types, &hc, c,
+                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
       /* store in global hashmap */
-      GNUNET_CONTAINER_multihashmap_put(
-          types,
-          &hc,
-          c,
-          GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+      GNUNET_CONTAINER_multihashmap_put (types, &hc, c,
+                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
     }
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2383,9 +2363,7 @@
   /* Start DHT search if needed */
   if (MESH_PEER_READY != peer_info->state && NULL == peer_info->dhtget)
   {
-    peer_info->dhtget = GNUNET_DHT_get_start (dht_handle, 
GNUNET_TIME_UNIT_FOREVER_REL,
-                                              GNUNET_BLOCK_TYPE_TEST,
-                                              &peer_msg->peer.hashPubKey, 4,   
/* replication level */
+    peer_info->dhtget = GNUNET_DHT_get_start (dht_handle, 
GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_BLOCK_TYPE_TEST, 
&peer_msg->peer.hashPubKey, 4,  /* replication level */
                                               GNUNET_DHT_RO_RECORD_ROUTE, 
NULL, /* bloom filter */
                                               0,        /* mutator */
                                               NULL,     /* xquery */
@@ -2517,26 +2495,27 @@
   type = ntohl (connect_msg->type);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  type requested: %u\n", type);
   GNUNET_CRYPTO_hash (&type, sizeof (GNUNET_MESH_ApplicationType), &hash);
-  if (GNUNET_CONTAINER_multihashmap_contains(applications, &hash) == 
GNUNET_YES)
+  if (GNUNET_CONTAINER_multihashmap_contains (applications, &hash) ==
+      GNUNET_YES)
   {
     /* Yes! Fast forward, add ourselves to the tunnel and send the
-      * good news to the client
-      */
+     * good news to the client
+     */
     struct GNUNET_MESH_PeerControl pc;
 
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  available locally\n");
     pc.peer = my_full_id;
     GNUNET_CONTAINER_multihashmap_put (t->peers, &pc.peer.hashPubKey,
-                                        get_peer_info (&pc.peer),
-                                        
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
+                                       get_peer_info (&pc.peer),
+                                       
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
     pc.header.size = htons (sizeof (struct GNUNET_MESH_PeerControl));
     pc.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD);
     pc.tunnel_id = htonl (t->local_tid);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  notifying client\n");
-    GNUNET_SERVER_notification_context_unicast (nc,   /* context */
-                                                client,       /* dest */
-                                                &pc.header,   /* msg */
-                                                GNUNET_NO);   /* can drop? */
+    GNUNET_SERVER_notification_context_unicast (nc,     /* context */
+                                                client, /* dest */
+                                                &pc.header,     /* msg */
+                                                GNUNET_NO);     /* can drop? */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  Done\n");
     GNUNET_SERVER_receive_done (client, GNUNET_OK);
     return;
@@ -2546,22 +2525,13 @@
   {
     GNUNET_DHT_get_stop (c->dht_get_type);
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "MESH:  looking in DHT for %s\n",
-              GNUNET_h2s_full(&hash));
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH:  looking in DHT for %s\n",
+              GNUNET_h2s_full (&hash));
   c->dht_get_type =
-      GNUNET_DHT_get_start (dht_handle,
-                            GNUNET_TIME_UNIT_FOREVER_REL,
-                            GNUNET_BLOCK_TYPE_TEST,
-                            &hash,
-                            10U,
-                            GNUNET_DHT_RO_RECORD_ROUTE,
-                            NULL,
-                            0,
-                            NULL,
-                            0,
-                            &dht_get_type_handler,
-                            t);
+      GNUNET_DHT_get_start (dht_handle, GNUNET_TIME_UNIT_FOREVER_REL,
+                            GNUNET_BLOCK_TYPE_TEST, &hash, 10U,
+                            GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0, NULL, 0,
+                            &dht_get_type_handler, t);
 
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
   return;
@@ -2639,7 +2609,7 @@
     /* Work around const limitation */
     memcpy (&copy, data_msg, sizeof (struct GNUNET_MESH_Unicast));
     copy.oid = my_full_id;
-    copy.tid = htonl(t->id.tid);
+    copy.tid = htonl (t->id.tid);
     handle_mesh_data_unicast (NULL, &my_full_id, &copy.header, NULL);
     return;
   }
@@ -2858,7 +2828,7 @@
   {
     for (c = clients; NULL != c; c = c->next)
       if (NULL != c->dht_get_type)
-        GNUNET_DHT_get_stop(c->dht_get_type);
+        GNUNET_DHT_get_stop (c->dht_get_type);
     GNUNET_DHT_disconnect (dht_handle);
     dht_handle = NULL;
   }

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/mesh/mesh_api.c  2011-09-14 11:59:46 UTC (rev 16833)
@@ -921,4 +921,4 @@
   GNUNET_free (handle);
 }
 
-/* end of mesh_api.c */
\ No newline at end of file
+/* end of mesh_api.c */

Modified: gnunet/src/mesh/mesh_api_new.c
===================================================================
--- gnunet/src/mesh/mesh_api_new.c      2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/mesh/mesh_api_new.c      2011-09-14 11:59:46 UTC (rev 16833)
@@ -773,7 +773,7 @@
   GNUNET_PEER_Id id;
   uint16_t size;
 
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh: processig peer event\n");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: processig peer event\n");
   size = ntohs (msg->header.size);
   if (size != sizeof (struct GNUNET_MESH_PeerControl))
   {
@@ -789,9 +789,9 @@
   id = GNUNET_PEER_search (&msg->peer);
   if ((p = retrieve_peer (t, id)) == NULL)
     p = add_peer_to_tunnel (t, &msg->peer);
-  if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD == ntohs(msg->header.type))
+  if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD == ntohs (msg->header.type))
   {
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh: adding peer\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: adding peer\n");
     if (NULL != t->connect_handler)
     {
       atsi.type = 0;
@@ -802,7 +802,7 @@
   }
   else
   {
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh: removing peer\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: removing peer\n");
     if (NULL != t->disconnect_handler && p->connected)
     {
       t->disconnect_handler (t->cls, &msg->peer);
@@ -810,7 +810,7 @@
     remove_peer_from_tunnel (p);
     GNUNET_free (p);
   }
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh: processing peer event END\n");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: processing peer event END\n");
 }
 
 
@@ -1165,12 +1165,13 @@
     apps = (GNUNET_MESH_ApplicationType *) &msg[1];
     for (napps = 0; napps < h->n_applications; napps++)
     {
-      apps[napps] = htonl(h->applications[napps]);
-      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "mesh:  app %u\n", 
h->applications[napps]);
+      apps[napps] = htonl (h->applications[napps]);
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh:  app %u\n",
+                  h->applications[napps]);
     }
-    types = (uint16_t *) &apps[napps];
+    types = (uint16_t *) & apps[napps];
     for (ntypes = 0; ntypes < h->n_handlers; ntypes++)
-      types[ntypes] = htons(h->message_handlers[ntypes].type);
+      types[ntypes] = htons (h->message_handlers[ntypes].type);
     msg->applications = htons (napps);
     msg->types = htons (ntypes);
 #if DEBUG

Modified: gnunet/src/mesh/test_mesh_local_1.c
===================================================================
--- gnunet/src/mesh/test_mesh_local_1.c 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/mesh/test_mesh_local_1.c 2011-09-14 11:59:46 UTC (rev 16833)
@@ -107,9 +107,9 @@
  */
 static int
 data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
-          const struct GNUNET_PeerIdentity *sender,
-          const struct GNUNET_MessageHeader *message,
-          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_PeerIdentity *sender,
+               const struct GNUNET_MessageHeader *message,
+               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -140,7 +140,7 @@
   if (id != 1)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-        "test: received incoming tunnel on peer 2\n");
+                "test: received incoming tunnel on peer 2\n");
     result = GNUNET_SYSERR;
   }
   return NULL;
@@ -157,8 +157,7 @@
  *                   with the tunnel is stored
  */
 static void
-inbound_end (void *cls,
-             const struct GNUNET_MESH_Tunnel * tunnel,
+inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
              void *tunnel_ctx)
 {
   unsigned int id = *(unsigned int *) cls;
@@ -167,7 +166,7 @@
   if (id != 1)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-        "test: received closing tunnel on peer 2\n");
+                "test: received closing tunnel on peer 2\n");
     result = GNUNET_SYSERR;
   }
 }
@@ -179,13 +178,12 @@
  * @param cls closure
  * @param peer peer identity the tunnel stopped working with
  */
-static void peer_conected (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer,
-    const struct GNUNET_TRANSPORT_ATS_Information * atsi)
+static void
+peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer,
+               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n");
-  GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
 }
 
 
@@ -196,9 +194,8 @@
  * @param peer peer identity the tunnel was created to, NULL on timeout
  * @param atsi performance data for the connection
  */
-static void peer_disconnected (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer)
+static void
+peer_disconnected (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer disconnected\n");
 }
@@ -225,7 +222,7 @@
 static void
 do_find (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-  GNUNET_MESH_peer_request_connect_by_type(t, 1);
+  GNUNET_MESH_peer_request_connect_by_type (t, 1);
 }
 
 
@@ -265,12 +262,9 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: YAY! CONNECTED TO MESH :D\n");
   }
 
-  t = GNUNET_MESH_tunnel_create (mesh_peer_2,
-                                 NULL,
-                                 &peer_conected,
-                                 &peer_disconnected,
-                                 (void *) &two);
-  GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &do_find, NULL);
+  t = GNUNET_MESH_tunnel_create (mesh_peer_2, NULL, &peer_conected,
+                                 &peer_disconnected, (void *) &two);
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_find, NULL);
 }
 
 

Modified: gnunet/src/mesh/test_mesh_local_2.c
===================================================================
--- gnunet/src/mesh/test_mesh_local_2.c 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/mesh/test_mesh_local_2.c 2011-09-14 11:59:46 UTC (rev 16833)
@@ -80,7 +80,7 @@
 static void
 do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
-   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: ABORT\n");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: ABORT\n");
   if (0 != test_task)
   {
     GNUNET_SCHEDULER_cancel (test_task);
@@ -105,9 +105,9 @@
  */
 static int
 data_callback (void *cls, struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
-          const struct GNUNET_PeerIdentity *sender,
-          const struct GNUNET_MessageHeader *message,
-          const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+               const struct GNUNET_PeerIdentity *sender,
+               const struct GNUNET_MessageHeader *message,
+               const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Data callback\n");
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
@@ -138,7 +138,7 @@
   if (id != 1)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-        "test: received incoming tunnel on peer 2\n");
+                "test: received incoming tunnel on peer 2\n");
     result = GNUNET_SYSERR;
   }
   return NULL;
@@ -155,8 +155,7 @@
  *                   with the tunnel is stored
  */
 static void
-inbound_end (void *cls,
-             const struct GNUNET_MESH_Tunnel * tunnel,
+inbound_end (void *cls, const struct GNUNET_MESH_Tunnel *tunnel,
              void *tunnel_ctx)
 {
   unsigned int id = (unsigned int) cls;
@@ -165,7 +164,7 @@
   if (id != 1)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-        "test: received closing tunnel on peer 2\n");
+                "test: received closing tunnel on peer 2\n");
     result = GNUNET_SYSERR;
   }
 }
@@ -177,12 +176,11 @@
  * @param cls closure
  * @param peer peer identity the tunnel stopped working with
  */
-static void peer_conected (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer)
+static void
+peer_conected (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer connected\n");
-  GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &do_shutdown, NULL);
 }
 
 
@@ -193,10 +191,9 @@
  * @param peer peer identity the tunnel was created to, NULL on timeout
  * @param atsi performance data for the connection
  */
-static void peer_disconnected (
-    void *cls,
-    const struct GNUNET_PeerIdentity * peer,
-    const struct GNUNET_TRANSPORT_ATS_Information * atsi)
+static void
+peer_disconnected (void *cls, const struct GNUNET_PeerIdentity *peer,
+                   const struct GNUNET_TRANSPORT_ATS_Information *atsi)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: peer disconnected\n");
 }
@@ -265,15 +262,12 @@
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: YAY! CONNECTED TO MESH :D\n");
   }
 
-  t = GNUNET_MESH_tunnel_create (mesh_peer_2,
-                                 NULL,
-                                 &peer_conected,
-                                 &peer_disconnected,
-                                 (void *) 2);
-  GNUNET_MESH_peer_request_connect_by_type(t, 1);
-  test_task = GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS,
-                                           &do_connect_peer_1,
-                                           cfg);
+  t = GNUNET_MESH_tunnel_create (mesh_peer_2, NULL, &peer_conected,
+                                 &peer_disconnected, (void *) 2);
+  GNUNET_MESH_peer_request_connect_by_type (t, 1);
+  test_task =
+      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+                                    &do_connect_peer_1, cfg);
 }
 
 

Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo.c  2011-09-14 11:59:46 UTC (rev 
16833)
@@ -158,7 +158,7 @@
     GNUNET_PEERINFO_disconnect (peerinfo);
     return;
   }
-  if ( (be_quiet) || (NULL == hello) )
+  if ((be_quiet) || (NULL == hello))
   {
     GNUNET_CRYPTO_hash_to_enc (&peer->hashPubKey, &enc);
     printf ("%s\n", (const char *) &enc);

Modified: gnunet/src/testing/test_testing_connect.c
===================================================================
--- gnunet/src/testing/test_testing_connect.c   2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/testing/test_testing_connect.c   2011-09-14 11:59:46 UTC (rev 
16833)
@@ -116,8 +116,8 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n",
               GNUNET_i2s (id));
 #endif
-  cc = GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS, 
GNUNET_YES,
-                                      &my_connect_complete, NULL);
+  cc = GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS,
+                                       GNUNET_YES, &my_connect_complete, NULL);
 }
 
 

Modified: gnunet/src/testing/test_testing_reconnect.c
===================================================================
--- gnunet/src/testing/test_testing_reconnect.c 2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/testing/test_testing_reconnect.c 2011-09-14 11:59:46 UTC (rev 
16833)
@@ -146,8 +146,8 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n",
               GNUNET_i2s (id));
 #endif
-  cc = GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS, 
GNUNET_YES,
-                                      &my_connect_complete, NULL);
+  cc = GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS,
+                                       GNUNET_YES, &my_connect_complete, NULL);
 }
 
 

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/testing/testing.c        2011-09-14 11:59:46 UTC (rev 16833)
@@ -88,6 +88,7 @@
 {
   struct GNUNET_TESTING_Daemon *daemon = cls;
   int msize;
+
 #if EMPTY_HACK
   int empty;
 
@@ -1870,7 +1871,8 @@
   else if (ctx->connect_attempts > 0)
   {
     ctx->d1core_ready = GNUNET_NO;
-    ctx->timeout_task = GNUNET_SCHEDULER_add_now (&reattempt_daemons_connect, 
ctx);
+    ctx->timeout_task =
+        GNUNET_SCHEDULER_add_now (&reattempt_daemons_connect, ctx);
     return;
   }
   else
@@ -1907,12 +1909,12 @@
   if (0 != memcmp (&ctx->d2->id, peer, sizeof (struct GNUNET_PeerIdentity)))
     return;
   ctx->connected = GNUNET_YES;
-  ctx->distance = 0;          /* FIXME: distance */
+  ctx->distance = 0;            /* FIXME: distance */
   if (ctx->hello_send_task != GNUNET_SCHEDULER_NO_TASK)
-    {
-      GNUNET_SCHEDULER_cancel (ctx->hello_send_task);
-      ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK;
-    }
+  {
+    GNUNET_SCHEDULER_cancel (ctx->hello_send_task);
+    ctx->hello_send_task = GNUNET_SCHEDULER_NO_TASK;
+  }
   GNUNET_SCHEDULER_cancel (ctx->timeout_task);
   ctx->timeout_task = GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
 }
@@ -2130,75 +2132,73 @@
     return;
   }
   if (peer != NULL)
-    return; /* ignore other peers */
+    return;                     /* ignore other peers */
   /* peer == NULL: End of iteration over peers */
-  
-    GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ctx->timeout_task);
-    if (ctx->connected == GNUNET_YES)
-    {
-      ctx->timeout_task =
-          GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
-      return;
-    }
 
-    /* Peer not already connected, need to schedule connect request! */
-    if (ctx->d1core == NULL)
-    {
+  GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ctx->timeout_task);
+  if (ctx->connected == GNUNET_YES)
+  {
+    ctx->timeout_task = GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
+    return;
+  }
+
+  /* Peer not already connected, need to schedule connect request! */
+  if (ctx->d1core == NULL)
+  {
 #if DEBUG_TESTING
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Peers are NOT connected, connecting to core!\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Peers are NOT connected, connecting to core!\n");
 #endif
-      ctx->d1core =
-          GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
-                               &connect_notify, NULL, NULL, NULL, GNUNET_NO,
-                               NULL, GNUNET_NO, no_handlers);
-    }
+    ctx->d1core =
+        GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
+                             &connect_notify, NULL, NULL, NULL, GNUNET_NO, 
NULL,
+                             GNUNET_NO, no_handlers);
+  }
 
-    if (ctx->d1core == NULL)
+  if (ctx->d1core == NULL)
+  {
+    ctx->timeout_task = GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
+    return;
+  }
+
+  if ((NULL == ctx->d2->hello) && (ctx->d2->th == NULL))        /* Do not yet 
have the second peer's hello, set up a task to get it */
+  {
+    ctx->d2->th =
+        GNUNET_TRANSPORT_connect (ctx->d2->cfg, &ctx->d2->id, NULL, NULL, NULL,
+                                  NULL);
+    if (ctx->d2->th == NULL)
     {
+      GNUNET_CORE_disconnect (ctx->d1core);
+      ctx->d1core = NULL;
       ctx->timeout_task =
           GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
       return;
     }
+    ctx->d2->ghh =
+        GNUNET_TRANSPORT_get_hello (ctx->d2->th, &process_hello, ctx->d2);
+  }
 
-    if ((NULL == ctx->d2->hello) && (ctx->d2->th == NULL))      /* Do not yet 
have the second peer's hello, set up a task to get it */
+  if (ctx->send_hello == GNUNET_YES)
+  {
+    ctx->d1th =
+        GNUNET_TRANSPORT_connect (ctx->d1->cfg, &ctx->d1->id, ctx->d1, NULL,
+                                  NULL, NULL);
+    if (ctx->d1th == NULL)
     {
-      ctx->d2->th =
-          GNUNET_TRANSPORT_connect (ctx->d2->cfg, &ctx->d2->id, NULL, NULL,
-                                    NULL, NULL);
-      if (ctx->d2->th == NULL)
-      {
-        GNUNET_CORE_disconnect (ctx->d1core);
-       ctx->d1core = NULL;
-       ctx->timeout_task =
+      GNUNET_CORE_disconnect (ctx->d1core);
+      ctx->d1core = NULL;
+      ctx->timeout_task =
           GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
-        return;
-      }
-      ctx->d2->ghh =
-          GNUNET_TRANSPORT_get_hello (ctx->d2->th, &process_hello, ctx->d2);
+      return;
     }
+    GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ctx->hello_send_task);
+    ctx->hello_send_task = GNUNET_SCHEDULER_add_now (&send_hello, ctx);
+  }
 
-    if (ctx->send_hello == GNUNET_YES)
-    {
-      ctx->d1th =
-          GNUNET_TRANSPORT_connect (ctx->d1->cfg, &ctx->d1->id, ctx->d1, NULL,
-                                    NULL, NULL);
-      if (ctx->d1th == NULL)
-      {
-        GNUNET_CORE_disconnect (ctx->d1core);
-       ctx->d1core = NULL;
-       ctx->timeout_task =
-          GNUNET_SCHEDULER_add_now (&notify_connect_result, ctx);
-        return;
-      }
-      GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == ctx->hello_send_task);
-      ctx->hello_send_task = GNUNET_SCHEDULER_add_now (&send_hello, ctx);
-    }
+  ctx->timeout_task =
+      GNUNET_SCHEDULER_add_delayed (ctx->relative_timeout,
+                                    &notify_connect_result, ctx);
 
-    ctx->timeout_task =
-        GNUNET_SCHEDULER_add_delayed (ctx->relative_timeout,
-                                      &notify_connect_result, ctx);
-
 }
 
 
@@ -2271,29 +2271,28 @@
  * @param cc connect context
  */
 void
-GNUNET_TESTING_daemons_connect_cancel (struct GNUNET_TESTING_ConnectContext
-                                       *cc)
+GNUNET_TESTING_daemons_connect_cancel (struct GNUNET_TESTING_ConnectContext 
*cc)
 {
   if (GNUNET_SCHEDULER_NO_TASK != cc->timeout_task)
-    {
-      GNUNET_SCHEDULER_cancel (cc->timeout_task);
-      cc->timeout_task = GNUNET_SCHEDULER_NO_TASK;
-    }
+  {
+    GNUNET_SCHEDULER_cancel (cc->timeout_task);
+    cc->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+  }
   if (GNUNET_SCHEDULER_NO_TASK != cc->hello_send_task)
-    {
-      GNUNET_SCHEDULER_cancel (cc->hello_send_task);
-      cc->hello_send_task = GNUNET_SCHEDULER_NO_TASK;
-    }
+  {
+    GNUNET_SCHEDULER_cancel (cc->hello_send_task);
+    cc->hello_send_task = GNUNET_SCHEDULER_NO_TASK;
+  }
   if (NULL != cc->d1core)
-    {
-      GNUNET_CORE_disconnect (cc->d1core);
-      cc->d1core = NULL;
-    }
+  {
+    GNUNET_CORE_disconnect (cc->d1core);
+    cc->d1core = NULL;
+  }
   if (NULL != cc->d1th)
-    {
-      GNUNET_TRANSPORT_disconnect (cc->d1th);
-      cc->d1th = NULL;
-    }
+  {
+    GNUNET_TRANSPORT_disconnect (cc->d1th);
+    cc->d1th = NULL;
+  }
   GNUNET_free (cc);
 }
 

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/testing/testing_group.c  2011-09-14 11:59:46 UTC (rev 16833)
@@ -893,7 +893,7 @@
 
   /**
    * Context in 'testing.c', to cancel connection attempt.
-   */ 
+   */
   struct GNUNET_TESTING_ConnectContext *cc;
 
   /**
@@ -3231,10 +3231,9 @@
   connect_context->first_index = random_peer;
   connect_context->second_index = connection_iter->index;
   connect_context->ct_ctx = ct_ctx;
-  connect_context->task = GNUNET_SCHEDULER_add_now (&schedule_connect, 
connect_context);
-  GNUNET_CONTAINER_DLL_insert (pg->cc_head,
-                              pg->cc_tail,
-                              connect_context);
+  connect_context->task =
+      GNUNET_SCHEDULER_add_now (&schedule_connect, connect_context);
+  GNUNET_CONTAINER_DLL_insert (pg->cc_head, pg->cc_tail, connect_context);
   GNUNET_CONTAINER_DLL_remove (pg->peers[random_peer].connect_peers_head,
                                pg->peers[random_peer].connect_peers_tail,
                                connection_iter);
@@ -3639,9 +3638,7 @@
   connect_ctx->cc = NULL;
   GNUNET_assert (0 < pg->outstanding_connects);
   pg->outstanding_connects--;
-  GNUNET_CONTAINER_DLL_remove (pg->cc_head,
-                              pg->cc_tail,
-                              connect_ctx);
+  GNUNET_CONTAINER_DLL_remove (pg->cc_head, pg->cc_tail, connect_ctx);
   /*
    * Check whether the inverse connection has been scheduled yet,
    * if not, we can remove it from the other peers list and avoid
@@ -3719,33 +3716,36 @@
                 _
                 ("Delaying connect, we have too many outstanding 
connections!\n"));
 #endif
-    connect_context->task = GNUNET_SCHEDULER_add_delayed 
(GNUNET_TIME_relative_multiply
-                                                         
(GNUNET_TIME_UNIT_MILLISECONDS, 100),
-                                                         &schedule_connect, 
connect_context);
+    connect_context->task =
+        GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
+                                      (GNUNET_TIME_UNIT_MILLISECONDS, 100),
+                                      &schedule_connect, connect_context);
     return;
   }
 #if VERBOSE_TESTING
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                _
-                ("Creating connection, outstanding_connections is %d (max 
%d)\n"),
-                pg->outstanding_connects, pg->max_outstanding_connections);
+  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+              _
+              ("Creating connection, outstanding_connections is %d (max 
%d)\n"),
+              pg->outstanding_connects, pg->max_outstanding_connections);
 #endif
-    pg->outstanding_connects++;
-    pg->total_connects_scheduled++;
-    GNUNET_assert (NULL == connect_context->cc);
-    connect_context->cc 
-      = GNUNET_TESTING_daemons_connect (pg->
-                                    peers[connect_context->first_index].daemon,
-                                    pg->peers[connect_context->
-                                              second_index].daemon,
-                                    connect_context->ct_ctx->connect_timeout,
-                                    connect_context->ct_ctx->connect_attempts,
+  pg->outstanding_connects++;
+  pg->total_connects_scheduled++;
+  GNUNET_assert (NULL == connect_context->cc);
+  connect_context->cc =
+      GNUNET_TESTING_daemons_connect (pg->
+                                      peers[connect_context->
+                                            first_index].daemon,
+                                      pg->peers[connect_context->
+                                                second_index].daemon,
+                                      connect_context->ct_ctx->connect_timeout,
+                                      
connect_context->ct_ctx->connect_attempts,
 #if USE_SEND_HELLOS
-                                    GNUNET_NO,
+                                      GNUNET_NO,
 #else
-                                    GNUNET_YES,
+                                      GNUNET_YES,
 #endif
-                                    &internal_connect_notify, 
connect_context); 
+                                      &internal_connect_notify,
+                                      connect_context);
 
 }
 
@@ -3772,10 +3772,10 @@
   connect_context->first = first->daemon;
   connect_context->second = second;
   connect_context->ct_ctx = ct_ctx;
-  connect_context->task = GNUNET_SCHEDULER_add_now (&schedule_connect, 
connect_context);
-  GNUNET_CONTAINER_DLL_insert (ct_ctx->pg->cc_head,
-                              ct_ctx->pg->cc_tail,
-                              connect_context);
+  connect_context->task =
+      GNUNET_SCHEDULER_add_now (&schedule_connect, connect_context);
+  GNUNET_CONTAINER_DLL_insert (ct_ctx->pg->cc_head, ct_ctx->pg->cc_tail,
+                               connect_context);
   return GNUNET_YES;
 }
 #endif
@@ -7103,16 +7103,14 @@
 
   GNUNET_assert (pg->total > 0);
   while (NULL != (cc = pg->cc_head))
-    {
-      GNUNET_CONTAINER_DLL_remove (pg->cc_head,
-                                  pg->cc_tail,
-                                  cc);
-      if (GNUNET_SCHEDULER_NO_TASK != cc->task)
-       GNUNET_SCHEDULER_cancel (cc->task);
-      if (NULL != cc->cc)
-       GNUNET_TESTING_daemons_connect_cancel (cc->cc);
-      GNUNET_free (cc);
-    }
+  {
+    GNUNET_CONTAINER_DLL_remove (pg->cc_head, pg->cc_tail, cc);
+    if (GNUNET_SCHEDULER_NO_TASK != cc->task)
+      GNUNET_SCHEDULER_cancel (cc->task);
+    if (NULL != cc->cc)
+      GNUNET_TESTING_daemons_connect_cancel (cc->cc);
+    GNUNET_free (cc);
+  }
 
   shutdown_ctx = GNUNET_malloc (sizeof (struct ShutdownContext));
   shutdown_ctx->delete_files =

Modified: gnunet/src/topology/test_gnunet_daemon_topology.c
===================================================================
--- gnunet/src/topology/test_gnunet_daemon_topology.c   2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/topology/test_gnunet_daemon_topology.c   2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -81,14 +81,14 @@
 {
   unsigned int i;
 
-  for (i=0;i<NUM_PEERS;i++)
+  for (i = 0; i < NUM_PEERS; i++)
+  {
+    if (NULL != cc[i])
     {
-      if (NULL != cc[i])
-       {
-         GNUNET_TESTING_daemons_connect_cancel (cc[i]);
-         cc[i] = NULL;
-       }
+      GNUNET_TESTING_daemons_connect_cancel (cc[i]);
+      cc[i] = NULL;
     }
+  }
   GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   ok = 0;
 }
@@ -111,12 +111,12 @@
   if (NULL != emsg)
   {
     fprintf (stderr, "Failed to connect two peers: %s\n", emsg);
-    for (i=0;i<NUM_PEERS;i++)
+    for (i = 0; i < NUM_PEERS; i++)
       if (NULL != cc[i])
-       {
-         GNUNET_TESTING_daemons_connect_cancel (cc[i]);
-         cc[i] = NULL;
-       }
+      {
+        GNUNET_TESTING_daemons_connect_cancel (cc[i]);
+        cc[i] = NULL;
+      }
     GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
     GNUNET_assert (0);
     return;
@@ -145,13 +145,17 @@
     last = d;
     return;
   }
-  cc[peers_left] = GNUNET_TESTING_daemons_connect (last, d, TIMEOUT, 
CONNECT_ATTEMPTS,
-                                                  GNUNET_YES, 
&notify_connect_complete, &cc[peers_left]);
+  cc[peers_left] =
+      GNUNET_TESTING_daemons_connect (last, d, TIMEOUT, CONNECT_ATTEMPTS,
+                                      GNUNET_YES, &notify_connect_complete,
+                                      &cc[peers_left]);
   if (peers_left == 0)
   {
     /* close circle */
-    cc[NUM_PEERS-1] = GNUNET_TESTING_daemons_connect (d, first, TIMEOUT, 
CONNECT_ATTEMPTS,
-                                                     GNUNET_YES, 
&notify_connect_complete, &cc[NUM_PEERS-1]);
+    cc[NUM_PEERS - 1] =
+        GNUNET_TESTING_daemons_connect (d, first, TIMEOUT, CONNECT_ATTEMPTS,
+                                        GNUNET_YES, &notify_connect_complete,
+                                        &cc[NUM_PEERS - 1]);
   }
 }
 

Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-14 
11:58:34 UTC (rev 16832)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-14 
11:59:46 UTC (rev 16833)
@@ -582,9 +582,11 @@
       GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
                                     &neighbour_timeout_task, n);
   connect_msg.header.size = htons (sizeof (struct SessionConnectMessage));
-  connect_msg.header.type = htons 
(GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT);
+  connect_msg.header.type =
+      htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT);
   connect_msg.reserved = htonl (0);
-  connect_msg.timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get 
());
+  connect_msg.timestamp =
+      GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
   GST_neighbours_send (peer, &connect_msg, sizeof (connect_msg),
                        GNUNET_TIME_UNIT_FOREVER_REL, NULL, NULL);
 }

Modified: gnunet/src/transport/gnunet-transport-wlan-helper.c
===================================================================
--- gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -1026,4 +1026,3 @@
   else
     return -1;
 }
-

Modified: gnunet/src/transport/plugin_transport_wlan.c
===================================================================
--- gnunet/src/transport/plugin_transport_wlan.c        2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/transport/plugin_transport_wlan.c        2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -1905,7 +1905,7 @@
                    session, newmsg->message_size);
 #endif
 #if DEBUG_wlan_msg_dump
-    hexdump(msgbuf,GNUNET_MIN(msgbuf_size, 256));
+  hexdump (msgbuf, GNUNET_MIN (msgbuf_size, 256));
 #endif
   //queue session
   queue_session (plugin, session);
@@ -2239,7 +2239,8 @@
   else
   {
     GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, PLUGIN_LOG_NAME,
-                     "wlan_data_message_handler got wrong message type: %u\n", 
ntohs (hdr->size));
+                     "wlan_data_message_handler got wrong message type: %u\n",
+                     ntohs (hdr->size));
     return;
   }
 }
@@ -2665,12 +2666,11 @@
 #if DEBUG_wlan
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
                      "Func wlan_process_helper got unknown message with number 
%u, size %u\n",
-                     ntohs (hdr->type),
-                     ntohs (hdr->size));
+                     ntohs (hdr->type), ntohs (hdr->size));
 
 #endif
 #if DEBUG_wlan_msg_dump
-    hexdump(hdr,GNUNET_MIN(ntohs (hdr->size), 256));
+    hexdump (hdr, GNUNET_MIN (ntohs (hdr->size), 256));
 #endif
     GNUNET_break (0);
     return;
@@ -2754,25 +2754,25 @@
                      filenamehw, plugin->interface, testmode);
 #endif
 
-    if (GNUNET_OS_check_helper_binary(filenamehw) == GNUNET_YES)
-      {
+    if (GNUNET_OS_check_helper_binary (filenamehw) == GNUNET_YES)
+    {
       plugin->server_proc =
-              GNUNET_OS_start_process (plugin->server_stdin, 
plugin->server_stdout,
-                                       filenamehw, filenamehw, 
plugin->interface,
-                                       NULL);
-      }
-    else if (GNUNET_OS_check_helper_binary(filenamehw) == GNUNET_NO)
-      {
-        GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
-                                 "gnunet-transport-wlan-helper is not suid, 
please change it or look at the doku\n");
-        GNUNET_break(0);
-      }
+          GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout,
+                                   filenamehw, filenamehw, plugin->interface,
+                                   NULL);
+    }
+    else if (GNUNET_OS_check_helper_binary (filenamehw) == GNUNET_NO)
+    {
+      GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
+                       "gnunet-transport-wlan-helper is not suid, please 
change it or look at the doku\n");
+      GNUNET_break (0);
+    }
     else
-      {
-        GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
-                                 "gnunet-transport-wlan-helper not found, 
please look if it exists and is the $PATH variable!\n");
-        GNUNET_break(0);
-      }
+    {
+      GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
+                       "gnunet-transport-wlan-helper not found, please look if 
it exists and is the $PATH variable!\n");
+      GNUNET_break (0);
+    }
 
   }
   else if (testmode == 1)
@@ -2784,18 +2784,19 @@
                      filenameloopback, plugin->interface, testmode);
 #endif
 
-    if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR)
-      {
+    if (GNUNET_OS_check_helper_binary (filenameloopback) != GNUNET_SYSERR)
+    {
       plugin->server_proc =
-        GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout,
-                                 filenameloopback, filenameloopback, "1", 
NULL);
-      }
+          GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout,
+                                   filenameloopback, filenameloopback, "1",
+                                   NULL);
+    }
     else
-      {
-        GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
-                           "gnunet-transport-wlan-helper-dummy not found, 
please look if it exists and is the $PATH variable!\n");
-        GNUNET_break(0);
-      }
+    {
+      GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
+                       "gnunet-transport-wlan-helper-dummy not found, please 
look if it exists and is the $PATH variable!\n");
+      GNUNET_break (0);
+    }
   }
   else if (testmode == 2)
   {
@@ -2804,18 +2805,19 @@
                      "Starting gnunet-wlan-helper loopback 2 process cmd: %s 
%s %i\n",
                      filenameloopback, plugin->interface, testmode);
 #endif
-    if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR)
-      {
-        plugin->server_proc =
-        GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout,
-                                 filenameloopback, filenameloopback, "2", 
NULL);
-      }
+    if (GNUNET_OS_check_helper_binary (filenameloopback) != GNUNET_SYSERR)
+    {
+      plugin->server_proc =
+          GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout,
+                                   filenameloopback, filenameloopback, "2",
+                                   NULL);
+    }
     else
-      {
-        GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
-                             "gnunet-transport-wlan-helper-dummy not found, 
please look if it exists and is in the $PATH variable!\n");
-        GNUNET_break(0);
-      }
+    {
+      GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
+                       "gnunet-transport-wlan-helper-dummy not found, please 
look if it exists and is in the $PATH variable!\n");
+      GNUNET_break (0);
+    }
   }
   if (plugin->server_proc == NULL)
   {

Modified: gnunet/src/transport/test_plugin_transport_wlan_dummy.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_wlan_dummy.c     2011-09-14 
11:58:34 UTC (rev 16832)
+++ gnunet/src/transport/test_plugin_transport_wlan_dummy.c     2011-09-14 
11:59:46 UTC (rev 16833)
@@ -163,13 +163,13 @@
     erg = mkfifo (FIFO_FILE1, 0666);
     if (0 != erg)
     {
-      fprintf (stderr, "Error at mkfifo1: %s\n", strerror(errno));
+      fprintf (stderr, "Error at mkfifo1: %s\n", strerror (errno));
       //exit(1);
     }
     erg = mkfifo (FIFO_FILE2, 0666);
     if (0 != erg)
     {
-      fprintf (stderr, "Error at mkfifo2: %s\n", strerror(errno));
+      fprintf (stderr, "Error at mkfifo2: %s\n", strerror (errno));
       //exit(1);
     }
 

Modified: gnunet/src/transport/test_transport_api_limited_sockets.c
===================================================================
--- gnunet/src/transport/test_transport_api_limited_sockets.c   2011-09-14 
11:58:34 UTC (rev 16832)
+++ gnunet/src/transport/test_transport_api_limited_sockets.c   2011-09-14 
11:59:46 UTC (rev 16833)
@@ -284,6 +284,7 @@
 {
   int ret = 0;
   int nat_res;
+
   test_plugin = NULL;
 
   GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
@@ -299,8 +300,9 @@
 #endif
                     NULL);
 
-  if ((test_plugin != NULL) && ((strcmp (test_plugin, "tcp_nat") == 0) ||
-      (strcmp (test_plugin, "udp_nat") == 0)))
+  if ((test_plugin != NULL) &&
+      ((strcmp (test_plugin, "tcp_nat") == 0) ||
+       (strcmp (test_plugin, "udp_nat") == 0)))
   {
     nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
     if (GNUNET_NO == nat_res)
@@ -329,13 +331,17 @@
   struct rlimit r_file_old;
   struct rlimit r_file_new;
   int res;
-  res = getrlimit(RLIMIT_NOFILE, &r_file_old);
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Maximum number of open files was: 
%u/%u\n", r_file_old.rlim_cur, r_file_old.rlim_max);
 
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Setting maximum number of open files 
to: %u\n", MAX_FILES);
+  res = getrlimit (RLIMIT_NOFILE, &r_file_old);
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Maximum number of open files was: %u/%u\n", r_file_old.rlim_cur,
+              r_file_old.rlim_max);
+
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Setting maximum number of open files to: %u\n", MAX_FILES);
   r_file_new.rlim_cur = MAX_FILES;
   r_file_new.rlim_max = r_file_old.rlim_max;
-  res = setrlimit(RLIMIT_NOFILE, &r_file_new);
+  res = setrlimit (RLIMIT_NOFILE, &r_file_new);
 
   if (res != 0)
   {
@@ -360,8 +366,9 @@
   GNUNET_free (test_name);
 
 #if HAVE_SETRLIMIT
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Restoring previous value maximum 
number of open files\n");
-  res = setrlimit(RLIMIT_NOFILE, &r_file_old);
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "Restoring previous value maximum number of open files\n");
+  res = setrlimit (RLIMIT_NOFILE, &r_file_old);
   if (res != 0)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Restoring limit failed!\n");

Modified: gnunet/src/transport/transport_api_address_lookup.c
===================================================================
--- gnunet/src/transport/transport_api_address_lookup.c 2011-09-14 11:58:34 UTC 
(rev 16832)
+++ gnunet/src/transport/transport_api_address_lookup.c 2011-09-14 11:59:46 UTC 
(rev 16833)
@@ -140,8 +140,8 @@
     return NULL;
   }
   client = GNUNET_CLIENT_connect ("transport", cfg);
-  if (client == NULL)    
-    return NULL;  
+  if (client == NULL)
+    return NULL;
   msg = GNUNET_malloc (len);
   msg->header.size = htons (len);
   msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP);
@@ -172,7 +172,9 @@
  * @param alc handle for the request to cancel
  */
 void
-GNUNET_TRANSPORT_address_lookup_cancel (struct 
GNUNET_TRANSPORT_AddressLookupContext *alc)
+GNUNET_TRANSPORT_address_lookup_cancel (struct
+                                        GNUNET_TRANSPORT_AddressLookupContext
+                                        *alc)
 {
   GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
   GNUNET_free (alc);

Modified: gnunet/src/transport/transport_api_peer_address_lookup.c
===================================================================
--- gnunet/src/transport/transport_api_peer_address_lookup.c    2011-09-14 
11:58:34 UTC (rev 16832)
+++ gnunet/src/transport/transport_api_peer_address_lookup.c    2011-09-14 
11:59:46 UTC (rev 16833)
@@ -141,12 +141,13 @@
 
   client = GNUNET_CLIENT_connect ("transport", cfg);
   if (client == NULL)
-    return NULL;  
+    return NULL;
   msg.header.size = htons (sizeof (struct PeerAddressLookupMessage));
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PEER_ADDRESS_LOOKUP);
   msg.timeout = GNUNET_TIME_relative_hton (timeout);
   memcpy (&msg.peer, peer, sizeof (struct GNUNET_PeerIdentity));
-  alc = GNUNET_malloc (sizeof (struct 
GNUNET_TRANSPORT_PeerAddressLookupContext));
+  alc =
+      GNUNET_malloc (sizeof (struct 
GNUNET_TRANSPORT_PeerAddressLookupContext));
   alc->cb = peer_address_callback;
   alc->cb_cls = peer_address_callback_cls;
   alc->timeout = GNUNET_TIME_relative_to_absolute (timeout);
@@ -166,7 +167,9 @@
  * @param alc handle for the request to cancel
  */
 void
-GNUNET_TRANSPORT_peer_address_lookup_cancel (struct 
GNUNET_TRANSPORT_PeerAddressLookupContext *alc)
+GNUNET_TRANSPORT_peer_address_lookup_cancel (struct
+                                             
GNUNET_TRANSPORT_PeerAddressLookupContext
+                                             *alc)
 {
   GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
   GNUNET_free (alc);

Modified: gnunet/src/transport/wlan/helper_common.c
===================================================================
--- gnunet/src/transport/wlan/helper_common.c   2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/transport/wlan/helper_common.c   2011-09-14 11:59:46 UTC (rev 
16833)
@@ -34,12 +34,12 @@
  * @return number of bytes written
  */
 int
-send_mac_to_plugin (char *buffer, struct MacAddress * mac)
+send_mac_to_plugin (char *buffer, struct MacAddress *mac)
 {
 
   struct Wlan_Helper_Control_Message macmsg;
 
-  memcpy (&macmsg.mac,(char *) mac, sizeof (struct MacAddress));
+  memcpy (&macmsg.mac, (char *) mac, sizeof (struct MacAddress));
   macmsg.hdr.size = htons (sizeof (struct Wlan_Helper_Control_Message));
   macmsg.hdr.type = htons (GNUNET_MESSAGE_TYPE_WLAN_HELPER_CONTROL);
 

Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-09-14 11:58:34 UTC (rev 
16832)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-09-14 11:59:46 UTC (rev 
16833)
@@ -355,9 +355,10 @@
             app_type = GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY;
             if (NULL != tcp_tunnel)
               me->tunnel = tcp_tunnel;
-          } else
+          }
+          else
           {
-           GNUNET_assert (0);
+            GNUNET_assert (0);
           }
           if (me->tunnel == NULL && NULL != cls)
           {
@@ -489,17 +490,17 @@
             /* This is a mapping to a gnunet-service */
             memcpy (hc, &me->desc.service_descriptor, sizeof 
(GNUNET_HashCode));
 
-            if ( (IPPROTO_UDP == pkt->ip_hdr.proto) &&
-                (me->desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP)) 
&&
-                (port_in_ports (me->desc.ports, pkt_udp->udp_hdr.dpt) ||
-                 testBit (me->additional_ports, ntohs (pkt_udp->udp_hdr.dpt))) 
)
+            if ((IPPROTO_UDP == pkt->ip_hdr.proto) &&
+                (me->desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP)) 
&&
+                (port_in_ports (me->desc.ports, pkt_udp->udp_hdr.dpt) ||
+                 testBit (me->additional_ports, ntohs (pkt_udp->udp_hdr.dpt))))
             {
               hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP);
 
               memcpy (hc + 1, &pkt_udp->udp_hdr, ntohs (pkt_udp->udp_hdr.len));
 
             }
-            else if ( (IPPROTO_TCP == pkt->ip_hdr.proto) &&
+            else if ((IPPROTO_TCP == pkt->ip_hdr.proto) &&
                      (me->
                       desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP))
                      && (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))

Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-09-14 11:58:34 UTC (rev 16832)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-09-14 11:59:46 UTC (rev 16833)
@@ -1265,16 +1265,14 @@
   if ((strlen (section) < 8) ||
       (0 != strcmp (".gnunet.", section + (strlen (section) - 8))))
     return;
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
-             "Parsing dns-name %s\n", 
-             section);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing dns-name %s\n", section);
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg, section, "UDP_REDIRECTS",
-                                            &udp_redirects))
+                                             &udp_redirects))
     udp_redirects = NULL;
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg, section, "TCP_REDIRECTS",
-                                            &tcp_redirects))
+                                             &tcp_redirects))
     tcp_redirects = NULL;
 
   if (GNUNET_OK !=
@@ -1307,21 +1305,21 @@
   publish_name (section, ports, service_type, my_private_key);
   if (GNUNET_OK ==
       GNUNET_CONFIGURATION_get_value_string (cfg, section, "ALTERNATIVE_NAMES",
-                                            &alternative_names))
+                                             &alternative_names))
+  {
+    for (alternative_name = strtok (alternative_names, " ");
+         alternative_name != NULL; alternative_name = strtok (NULL, " "))
     {
-      for (alternative_name = strtok (alternative_names, " ");
-          alternative_name != NULL; alternative_name = strtok (NULL, " "))
-       {
-         char *altname =
-           alloca (strlen (alternative_name) + strlen (section) + 1 + 1);
-         strcpy (altname, alternative_name);
-         strcpy (altname + strlen (alternative_name) + 1, section);
-         altname[strlen (alternative_name)] = '.';
-         
-         publish_name (altname, ports, service_type, my_private_key);
-       }
-      GNUNET_free (alternative_names);
+      char *altname =
+          alloca (strlen (alternative_name) + strlen (section) + 1 + 1);
+      strcpy (altname, alternative_name);
+      strcpy (altname + strlen (alternative_name) + 1, section);
+      altname[strlen (alternative_name)] = '.';
+
+      publish_name (altname, ports, service_type, my_private_key);
     }
+    GNUNET_free (alternative_names);
+  }
   GNUNET_CRYPTO_rsa_key_free (my_private_key);
   GNUNET_free_non_null (udp_redirects);
   GNUNET_free_non_null (tcp_redirects);




reply via email to

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