gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35555 - gnunet/src/arm


From: gnunet
Subject: [GNUnet-SVN] r35555 - gnunet/src/arm
Date: Fri, 24 Apr 2015 08:42:44 +0200

Author: grothoff
Date: 2015-04-24 08:42:44 +0200 (Fri, 24 Apr 2015)
New Revision: 35555

Modified:
   gnunet/src/arm/arm_api.c
   gnunet/src/arm/test_arm_api.c
Log:
-indentation and doxygen fixes

Modified: gnunet/src/arm/arm_api.c
===================================================================
--- gnunet/src/arm/arm_api.c    2015-04-23 17:31:48 UTC (rev 35554)
+++ gnunet/src/arm/arm_api.c    2015-04-24 06:42:44 UTC (rev 35555)
@@ -91,7 +91,7 @@
   /**
    * ID of the reconnect task (if any).
    */
-  struct GNUNET_SCHEDULER_Task * reconnect_task;
+  struct GNUNET_SCHEDULER_Task *reconnect_task;
 
   /**
    * Current delay we use for re-trying to connect to core.
@@ -109,7 +109,7 @@
   unsigned char currently_down;
 
   /**
-   * GNUNET_YES if we're running a service test.
+   * #GNUNET_YES if we're running a service test.
    */
   unsigned char service_test_is_active;
 };
@@ -154,7 +154,7 @@
   GNUNET_ARM_ServiceListCallback list_cont;
 
   /**
-   * Closure for 'result_cont' or 'list_cont'.
+   * Closure for @e result_cont' or @e list_cont'.
    */
   void *cont_cls;
 
@@ -184,7 +184,7 @@
  * Connect to arm.
  *
  * @param h arm handle
- * @return GNUNET_OK on success, GNUNET_SYSERR on failure
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
  */
 static int
 reconnect_arm (struct GNUNET_ARM_Handle *h);
@@ -748,7 +748,7 @@
  * it is not, start the ARM process.
  *
  * @param cls the context for the request that we will report on (struct 
ARMControlMessage *)
- * @param result GNUNET_YES if ARM is running
+ * @param result #GNUNET_YES if ARM is running
  */
 static void
 arm_service_report (void *cls,
@@ -802,10 +802,15 @@
   if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (
       cm->h->cfg, "arm", "OPTIONS", &lopostfix))
     lopostfix = GNUNET_strdup ("");
-  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (
-      cm->h->cfg, "arm", "BINARY", &cbinary))
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (cm->h->cfg,
+                                             "arm",
+                                             "BINARY",
+                                             &cbinary))
   {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, "arm", "BINARY");
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
+                               "arm",
+                               "BINARY");
     if (cm->result_cont)
       cm->result_cont (cm->cont_cls,
                       GNUNET_ARM_REQUEST_SENT_OK, "arm",
@@ -815,20 +820,28 @@
     GNUNET_free (lopostfix);
     return;
   }
-  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (
-      cm->h->cfg, "arm", "CONFIG", &config))
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_filename (cm->h->cfg,
+                                               "arm", "CONFIG",
+                                               &config))
     config = NULL;
   binary = GNUNET_OS_get_libexec_binary_path (cbinary);
   GNUNET_asprintf (&quotedbinary,
                   "\"%s\"",
                   binary);
   GNUNET_free (cbinary);
-  if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value (
-          cm->h->cfg, "TESTING", "WEAKRANDOM")) &&
-      (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (
-          cm->h->cfg, "TESTING", "WEAKRANDOM")) &&
-      (GNUNET_NO == GNUNET_CONFIGURATION_have_value (
-          cm->h->cfg, "TESTING", "HOSTFILE")))
+  if ( (GNUNET_YES ==
+        GNUNET_CONFIGURATION_have_value (cm->h->cfg,
+                                         "TESTING",
+                                         "WEAKRANDOM")) &&
+       (GNUNET_YES ==
+        GNUNET_CONFIGURATION_get_value_yesno (cm->h->cfg,
+                                              "TESTING",
+                                              "WEAKRANDOM")) &&
+       (GNUNET_NO ==
+        GNUNET_CONFIGURATION_have_value (cm->h->cfg,
+                                         "TESTING",
+                                         "HOSTFILE")))
   {
     /* Means we are ONLY running locally */
     /* we're clearly running a test, don't daemonize */
@@ -839,7 +852,7 @@
                                         lopostfix, NULL);
     else
       proc = GNUNET_OS_start_process_s (GNUNET_NO, cm->std_inheritance,
-                              NULL, loprefix, quotedbinary, "-c", config,
+                                        NULL, loprefix, quotedbinary, "-c", 
config,
                                         /* no daemonization! */
                                         lopostfix, NULL);
   }
@@ -863,14 +876,16 @@
   if (NULL == proc)
   {
     if (cm->result_cont)
-      cm->result_cont (cm->cont_cls, GNUNET_ARM_REQUEST_SENT_OK, "arm",
-          GNUNET_ARM_RESULT_START_FAILED);
+      cm->result_cont (cm->cont_cls,
+                       GNUNET_ARM_REQUEST_SENT_OK, "arm",
+                       GNUNET_ARM_RESULT_START_FAILED);
     GNUNET_free (cm);
     return;
   }
   if (cm->result_cont)
-    cm->result_cont (cm->cont_cls, GNUNET_ARM_REQUEST_SENT_OK, "arm",
-        GNUNET_ARM_RESULT_STARTING);
+    cm->result_cont (cm->cont_cls,
+                     GNUNET_ARM_REQUEST_SENT_OK, "arm",
+                     GNUNET_ARM_RESULT_STARTING);
   GNUNET_OS_process_destroy (proc);
   h = cm->h;
   GNUNET_free (cm);
@@ -968,9 +983,13 @@
      */
     if (GNUNET_NO == h->currently_down)
     {
-      LOG (GNUNET_ERROR_TYPE_DEBUG, "ARM is already running\n");
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "ARM is already running\n");
       if (NULL != cont)
-        cont (cont_cls, GNUNET_ARM_REQUEST_SENT_OK, "arm", 
GNUNET_ARM_RESULT_IS_STARTED_ALREADY);
+        cont (cont_cls,
+              GNUNET_ARM_REQUEST_SENT_OK,
+              "arm",
+              GNUNET_ARM_RESULT_IS_STARTED_ALREADY);
     }
     else if (GNUNET_NO == h->service_test_is_active)
     {
@@ -1002,7 +1021,10 @@
       cm->std_inheritance = std_inheritance;
       memcpy (&cm[1], service_name, slen);
       h->service_test_is_active = GNUNET_YES;
-      GNUNET_CLIENT_service_test ("arm", h->cfg, timeout, &arm_service_report,
+      GNUNET_CLIENT_service_test ("arm",
+                                  h->cfg,
+                                  timeout,
+                                  &arm_service_report,
                                  cm);
     }
     else
@@ -1010,7 +1032,8 @@
       /* Service test is already running - tell user to chill out and try
        * again later.
        */
-      LOG (GNUNET_ERROR_TYPE_DEBUG, "Service test is already in progress, 
we're busy\n");
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "Service test is already in progress, we're busy\n");
       if (NULL != cont)
         cont (cont_cls, GNUNET_ARM_REQUEST_BUSY, NULL, 0);
     }
@@ -1026,7 +1049,7 @@
  * Stopping arm itself will not invalidate its handle, and
  * ARM API will try to restore connection to the ARM service,
  * even if ARM connection was lost because you asked for ARM to be stopped.
- * Call GNUNET_ARM_disconnect_and_free () to free the handle and prevent
+ * Call #GNUNET_ARM_disconnect_and_free() to free the handle and prevent
  * further connection attempts.
  *
  * @param h handle to ARM

Modified: gnunet/src/arm/test_arm_api.c
===================================================================
--- gnunet/src/arm/test_arm_api.c       2015-04-23 17:31:48 UTC (rev 35554)
+++ gnunet/src/arm/test_arm_api.c       2015-04-24 06:42:44 UTC (rev 35555)
@@ -190,8 +190,9 @@
   if (NULL != cfgfile)
   {
     if (GNUNET_OK !=
-        GNUNET_CONFIGURATION_get_value_filename (cfg, "arm", "CONFIG",
-                                              &armconfig))
+        GNUNET_CONFIGURATION_get_value_filename (cfg,
+                                                 "arm", "CONFIG",
+                                                 &armconfig))
     {
       GNUNET_CONFIGURATION_set_value_string ((struct 
GNUNET_CONFIGURATION_Handle
                                               *) cfg, "arm", "CONFIG",




reply via email to

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