debug messages, disable default services for testing
authorChristian Grothoff <christian@grothoff.org>
Mon, 19 Oct 2009 09:36:28 +0000 (09:36 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 19 Oct 2009 09:36:28 +0000 (09:36 +0000)
src/arm/arm_api.c
src/arm/gnunet-service-arm.c
src/arm/test_arm_api_data.conf

index 7f2274958813678988bd84da56755c44be58eab0..49e25b38ddb57804b28b5afd59e6945293f413d8 100644 (file)
@@ -278,7 +278,8 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg)
     }
 #if DEBUG_ARM
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              _("Received response from ARM service\n"));
+              "Received response from ARM service: %u\n",
+             ntohs(msg->type));
 #endif
   switch (ntohs (msg->type))
     {
index d43adeae270d96593f4aeb8eb86544d102a58a60..9aeb620f4b4453a568eae58566443796628d232b 100644 (file)
@@ -473,11 +473,15 @@ stop_service (struct GNUNET_SERVER_Client *client,
   unsigned long long port;
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Preparing to stop `%s'\n", servicename);
+              _("Preparing to stop `%s'\n"), servicename);
   pos = find_name (servicename);
   if ((pos != NULL) && (pos->kill_continuation != NULL))
     {
       /* killing already in progress */
+#if DEBUG_ARM
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Service `%s' is already down\n", servicename);
+#endif
       signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN);
       return;
     }
@@ -487,12 +491,23 @@ stop_service (struct GNUNET_SERVER_Client *client,
       pos->rc--;
       pos->next = running;
       running = pos;
+#if DEBUG_ARM
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Service `%s' still used by %u clients, will keep it running!\n",
+                 servicename,
+                 pos->rc);
+#endif
       signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_UP);
       GNUNET_SERVER_receive_done (client, GNUNET_OK);
       return;
     }
   if (pos != NULL)
     {
+#if DEBUG_ARM
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Sending kill signal to service `%s', waiting for process to die.\n",
+                 servicename);
+#endif
       if (0 != PLIBC_KILL (pos->pid, SIGTERM))
         GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
       pos->next = running;
@@ -508,6 +523,11 @@ stop_service (struct GNUNET_SERVER_Client *client,
     }
   else
     {
+#if DEBUG_ARM
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Sending termination request to service `%s'.\n",
+                 servicename);
+#endif
       if ( (GNUNET_OK ==
            GNUNET_CONFIGURATION_get_value_number (cfg,
                                                   servicename,
index b2592491711c5939ab6be4609f94b53621fe7024..cbfb305348e7bf19c3b7fcef46782abeee8e7436 100644 (file)
@@ -4,4 +4,8 @@ DEFAULTCONFIG = test_arm_api_data.conf
 
 [arm]
 PORT = 23354
+DEFAULTSERVICES =
+#DEBUG = YES
 
+[resolver]
+#DEBUG = YES