Merge branch 'master' of gnunet.org:gnunet
[oweals/gnunet.git] / src / arm / gnunet-arm.c
index 69e230f87dc8ef08d670a6eaf9cfcfff73fcd6bb..80b5ca3e296c43a19fdde106c6f6f1ffc8d89415 100644 (file)
@@ -14,6 +14,8 @@
     
      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
 */
 
 /**
@@ -74,7 +76,7 @@ static char *term;
 /**
  * Set to the name of the config file used.
  */
-static const char *config_file;
+static char *config_file;
 
 /**
  * Set to the directory where runtime files are stored.
@@ -172,6 +174,7 @@ delete_files ()
 static void
 shutdown_task (void *cls)
 {
+  (void) cls;
   if (NULL != al_task)
   {
     GNUNET_SCHEDULER_cancel (al_task);
@@ -284,6 +287,7 @@ conn_status (void *cls,
 {
   static int once;
 
+  (void) cls;
   if ( (GNUNET_SYSERR == connected) &&
        (0 == once) )
   {
@@ -312,6 +316,7 @@ start_callback (void *cls,
                enum GNUNET_ARM_RequestStatus rs,
                enum GNUNET_ARM_Result result)
 {
+  (void) cls;
   op = NULL;
   if (GNUNET_ARM_REQUEST_SENT_OK != rs)
   {
@@ -355,6 +360,7 @@ stop_callback (void *cls,
 {
   char *msg;
 
+  (void) cls;
   op = NULL;
   if (GNUNET_ARM_REQUEST_SENT_OK != rs)
   {
@@ -405,6 +411,7 @@ init_callback (void *cls,
               enum GNUNET_ARM_RequestStatus rs,
               enum GNUNET_ARM_Result result)
 {
+  (void) cls;
   op = NULL;
   if (GNUNET_ARM_REQUEST_SENT_OK != rs)
   {
@@ -452,6 +459,7 @@ term_callback (void *cls,
 {
   char *msg;
 
+  (void) cls;
   op = NULL;
   if (GNUNET_ARM_REQUEST_SENT_OK != rs)
   {
@@ -501,6 +509,7 @@ list_callback (void *cls,
 {
   unsigned int i;
 
+  (void) cls;
   op = NULL;
   if (GNUNET_ARM_REQUEST_SENT_OK != rs)
   {
@@ -538,6 +547,7 @@ list_callback (void *cls,
 static void
 action_loop (void *cls)
 {
+  (void) cls;
   al_task = NULL;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Running requested actions\n");
@@ -637,6 +647,7 @@ srv_status (void *cls,
 {
   const char *msg;
 
+  (void) cls;
   switch (status)
   {
   case GNUNET_ARM_SERVICE_MONITORING_STARTED:
@@ -679,6 +690,7 @@ srv_status (void *cls,
 static void
 timeout_task_cb (void *cls)
 {
+  (void) cls;
   timeout_task = NULL;
   ret = 2;
   GNUNET_SCHEDULER_shutdown ();
@@ -696,10 +708,12 @@ timeout_task_cb (void *cls)
 static void
 run (void *cls,
      char *const *args,
+     const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  char *armconfig;
-
+  (void) cls;
+  (void) args;
+  (void) cfgfile;
   cfg = GNUNET_CONFIGURATION_dup (c);
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg,