{
struct RequestContext *sctx;
size_t slen;
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+#if DEBUG_ARM
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Asked to start service `%s' within %llu ms\n"), service_name,
(unsigned long long) timeout.value);
+#endif
if (0 == strcasecmp ("arm", service_name))
{
slen = strlen ("arm") + 1;
/**
* Stop multiple services in the specified order. Convenience
* function. Works asynchronously, failures are not reported.
+ * Should normally only be called from gnunet-arm or testcases,
+ * stopping a service is generally otherwise a bad idea.
*
* @param cfg configuration to use (needed to contact ARM;
* the ARM service may internally use a different
*/
struct GNUNET_TIME_Absolute restartAt;
+#if RC
/**
* Reference counter (counts how many times we've been
* asked to start the service). We only actually stop
* it once rc hits zero.
*/
unsigned int rc;
+#endif
};
if (sl != NULL)
{
/* already running, just increment RC */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Service `%s' already running.\n"), servicename);
+#if RC
sl->rc++;
+#endif
sl->next = running;
running = sl;
signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_UP);
sl = GNUNET_malloc (sizeof (struct ServiceList));
sl->name = GNUNET_strdup (servicename);
sl->next = running;
+#if RC
sl->rc = 1;
+#endif
sl->binary = binary;
sl->config = config;
sl->mtime = sbuf.st_mtime;
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
}
+#if RC
if (pos->rc > 1)
{
/* RC>1, just decrement RC */
}
if (pos->rc == 1)
pos->rc--; /* decrement RC to zero */
+#endif
if (pos->killing_client != NULL)
{
/* killing already in progress */