-indentation
[oweals/gnunet.git] / src / transport / test_plugin_transport.c
index 1b58c8c73aa1dc5170560254053955ad3b7ab2e3..83ff7f1c4fdc4fa5cd2bdc93b464687a2056b147 100644 (file)
@@ -256,6 +256,7 @@ wait_end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   end ();
 }
 
+
 static void
 end_badly_now ()
 {
@@ -272,11 +273,12 @@ end_badly_now ()
   timeout_endbadly = GNUNET_SCHEDULER_add_now (&end_badly, NULL );
 }
 
+
 static struct GNUNET_TIME_Relative
 env_receive (void *cls,
-    const struct GNUNET_HELLO_Address *address,
-    struct Session *session,
-    const struct GNUNET_MessageHeader *message)
+             const struct GNUNET_HELLO_Address *address,
+             struct Session *session,
+             const struct GNUNET_MessageHeader *message)
 {
   /* do nothing */
   return GNUNET_TIME_relative_get_zero_ ();
@@ -284,20 +286,22 @@ env_receive (void *cls,
 
 static int got_reply;
 
+
 /**
  * Take the given address and append it to the set of results sent back to
  * the client.
  *
- * @param cls the transmission context used ('struct GNUNET_SERVER_TransmitContext*')
- * @param buf text to transmit
+ * @param cls closure
+ * @param address the address to print
+ * @param res result code
  */
 static void
-address_pretty_printer_cb (void *cls, const char *buf)
+address_pretty_printer_cb (void *cls, const char *address, int res)
 {
-  if (NULL != buf)
+  if (NULL != address)
   {
     got_reply = GNUNET_YES;
-    GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Pretty address : `%s'\n", buf);
+    GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Pretty address : `%s'\n", address);
     pretty_printers_running--;
   }
   else
@@ -311,9 +315,11 @@ address_pretty_printer_cb (void *cls, const char *buf)
   }
 }
 
+
 static void
-env_notify_address (void *cls, int add_remove,
-    const struct GNUNET_HELLO_Address *address)
+env_notify_address (void *cls,
+                    int add_remove,
+                    const struct GNUNET_HELLO_Address *address)
 {
   struct AddressWrapper *w;
   struct AddressWrapper *wtmp;
@@ -401,7 +407,8 @@ env_notify_address (void *cls, int add_remove,
     GNUNET_free(s2a);
 
     pretty_printers_running++;
-    api->address_pretty_printer (api->cls, address->transport_name, address->address, address->address_length, GNUNET_YES,
+    api->address_pretty_printer (api->cls, address->transport_name,
+        address->address, address->address_length, GNUNET_YES,
         GNUNET_TIME_UNIT_MINUTES, &address_pretty_printer_cb, w);
 
     if (GNUNET_OK != api->check_address (api->cls, w->address->address, w->address->address_length))
@@ -459,6 +466,7 @@ env_notify_address (void *cls, int add_remove,
   }
 }
 
+
 static struct GNUNET_ATS_Information
 env_get_address_type (void *cls, const struct sockaddr *addr, size_t addrlen)
 {
@@ -468,12 +476,14 @@ env_get_address_type (void *cls, const struct sockaddr *addr, size_t addrlen)
   return ats;
 }
 
+
 static const struct GNUNET_MessageHeader *
 env_get_our_hello ()
 {
   return (const struct GNUNET_MessageHeader *) hello;
 }
 
+
 static void
 env_session_end (void *cls,
                  const struct GNUNET_HELLO_Address *address,
@@ -482,15 +492,17 @@ env_session_end (void *cls,
 
 }
 
+
 static void
 env_update_metrics (void *cls,
-    const struct GNUNET_HELLO_Address *address,
-    struct Session *session,
-    const struct GNUNET_ATS_Information *ats,
-    uint32_t ats_count)
+                    const struct GNUNET_HELLO_Address *address,
+                    struct Session *session,
+                    const struct GNUNET_ATS_Information *ats,
+                    uint32_t ats_count)
 {
 }
 
+
 static void
 setup_plugin_environment ()
 {
@@ -507,13 +519,15 @@ setup_plugin_environment ()
   env.session_end = &env_session_end;
 }
 
+
 static int
 handle_helper_message (void *cls, void *client,
-    const struct GNUNET_MessageHeader *hdr)
+                       const struct GNUNET_MessageHeader *hdr)
 {
   return GNUNET_OK;
 }
 
+
 /**
  * Runs the test.
  *