global reindent, now with uncrustify hook enabled
[oweals/gnunet.git] / src / transport / transport_api_manipulation.c
index c6b16520f164c9457fc293ed8ab6883b8a215bef..4f4ccc4a0b994d93e5bd1df32e9e9b9d9c88af67 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) 2009-2013, 2016 GNUnet e.V.
 
      GNUnet is free software: you can redistribute it and/or modify it
-     under the terms of the GNU General Public License as published
+     under the terms of the GNU Affero General Public License as published
      by the Free Software Foundation, either version 3 of the License,
      or (at your option) any later version.
 
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-*/
+
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
+ */
 
 /**
  * @file transport/transport_api_manipulation.c
@@ -27,7 +32,7 @@
 #include "gnunet_transport_service.h"
 #include "transport.h"
 
-#define LOG(kind,...) GNUNET_log_from (kind, "transport-api",__VA_ARGS__)
+#define LOG(kind, ...) GNUNET_log_from (kind, "transport-api", __VA_ARGS__)
 
 
 /**
@@ -36,7 +41,6 @@
  */
 struct GNUNET_TRANSPORT_ManipulationHandle
 {
-
   /**
    * My client connection to the transport service.
    */
@@ -71,7 +75,8 @@ struct GNUNET_TRANSPORT_ManipulationHandle
  * @param h transport service to reconnect
  */
 static void
-disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_ManipulationHandle *h);
+disconnect_and_schedule_reconnect (struct
+                                   GNUNET_TRANSPORT_ManipulationHandle *h);
 
 
 /**
@@ -137,7 +142,8 @@ reconnect (void *cls)
  * @param h transport service to reconnect
  */
 static void
-disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_ManipulationHandle *h)
+disconnect_and_schedule_reconnect (struct
+                                   GNUNET_TRANSPORT_ManipulationHandle *h)
 {
   GNUNET_assert (NULL == h->reconnect_task);
   if (NULL != h->mq)
@@ -146,9 +152,9 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_ManipulationHandle *h
     h->mq = NULL;
   }
   h->reconnect_task =
-      GNUNET_SCHEDULER_add_delayed (h->reconnect_delay,
-                                    &reconnect,
-                                    h);
+    GNUNET_SCHEDULER_add_delayed (h->reconnect_delay,
+                                  &reconnect,
+                                  h);
   h->reconnect_delay = GNUNET_TIME_STD_BACKOFF (h->reconnect_delay);
 }
 
@@ -166,11 +172,12 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_ManipulationHandle *h
  * with one message delay.
  */
 void
-GNUNET_TRANSPORT_manipulation_set (struct GNUNET_TRANSPORT_ManipulationHandle *handle,
-                                  const struct GNUNET_PeerIdentity *peer,
-                                  const struct GNUNET_ATS_Properties *prop,
-                                  struct GNUNET_TIME_Relative delay_in,
-                                  struct GNUNET_TIME_Relative delay_out)
+GNUNET_TRANSPORT_manipulation_set (struct
+                                   GNUNET_TRANSPORT_ManipulationHandle *handle,
+                                   const struct GNUNET_PeerIdentity *peer,
+                                   const struct GNUNET_ATS_Properties *prop,
+                                   struct GNUNET_TIME_Relative delay_in,
+                                   struct GNUNET_TIME_Relative delay_out)
 {
   struct GNUNET_MQ_Envelope *env;
   struct TrafficMetricMessage *msg;
@@ -198,7 +205,8 @@ GNUNET_TRANSPORT_manipulation_set (struct GNUNET_TRANSPORT_ManipulationHandle *h
  * @return NULL on error
  */
 struct GNUNET_TRANSPORT_ManipulationHandle *
-GNUNET_TRANSPORT_manipulation_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
+GNUNET_TRANSPORT_manipulation_connect (const struct
+                                       GNUNET_CONFIGURATION_Handle *cfg)
 {
   struct GNUNET_TRANSPORT_ManipulationHandle *h;
 
@@ -222,7 +230,9 @@ GNUNET_TRANSPORT_manipulation_connect (const struct GNUNET_CONFIGURATION_Handle
  * @param handle handle to the service as returned from #GNUNET_TRANSPORT_manipulation_connect()
  */
 void
-GNUNET_TRANSPORT_manipulation_disconnect (struct GNUNET_TRANSPORT_ManipulationHandle *handle)
+GNUNET_TRANSPORT_manipulation_disconnect (struct
+                                          GNUNET_TRANSPORT_ManipulationHandle *
+                                          handle)
 {
   if (NULL == handle->reconnect_task)
     disconnect_and_schedule_reconnect (handle);