"Received confirmation for service shutdown.\n");
#endif
shutdown_ctx->confirmed = GNUNET_YES;
- GNUNET_CLIENT_receive (shutdown_ctx->sock,
- &service_shutdown_handler,
+ GNUNET_CLIENT_receive (shutdown_ctx->sock, &service_shutdown_handler,
shutdown_ctx, GNUNET_TIME_UNIT_FOREVER_REL);
break;
default: /* Fall through */
return 0; /* client disconnected */
}
- GNUNET_CLIENT_receive (shutdown_ctx->sock,
- &service_shutdown_handler, shutdown_ctx,
- GNUNET_TIME_UNIT_FOREVER_REL);
+ GNUNET_CLIENT_receive (shutdown_ctx->sock, &service_shutdown_handler,
+ shutdown_ctx, GNUNET_TIME_UNIT_FOREVER_REL);
shutdown_ctx->cancel_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
(shutdown_ctx->timeout),
shutdown_ctx->sock = sock;
shutdown_ctx->timeout = GNUNET_TIME_relative_to_absolute (timeout);
GNUNET_CLIENT_notify_transmit_ready (sock,
- sizeof (struct
- GNUNET_MessageHeader),
- timeout,
- GNUNET_YES,
- &write_shutdown, shutdown_ctx);
+ sizeof (struct GNUNET_MessageHeader),
+ timeout, GNUNET_YES, &write_shutdown,
+ shutdown_ctx);
}
"gnunet-service-arm");
#endif
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (pos->h->cfg,
- "arm", "PREFIX", &loprefix))
+ GNUNET_CONFIGURATION_get_value_string (pos->h->cfg, "arm", "PREFIX",
+ &loprefix))
loprefix = GNUNET_strdup ("");
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (pos->h->cfg,
- "arm", "OPTIONS", &lopostfix))
+ GNUNET_CONFIGURATION_get_value_string (pos->h->cfg, "arm", "OPTIONS",
+ &lopostfix))
lopostfix = GNUNET_strdup ("");
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (pos->h->cfg,
- "arm", "BINARY", &binary))
+ GNUNET_CONFIGURATION_get_value_string (pos->h->cfg, "arm", "BINARY",
+ &binary))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
return;
}
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (pos->h->cfg,
- "arm", "CONFIG", &config))
+ GNUNET_CONFIGURATION_get_value_filename (pos->h->cfg, "arm", "CONFIG",
+ &config))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
* @param type type of the request
*/
static void
-change_service (struct GNUNET_ARM_Handle *h,
- const char *service_name,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_ARM_Callback cb, void *cb_cls, uint16_t type)
+change_service (struct GNUNET_ARM_Handle *h, const char *service_name,
+ struct GNUNET_TIME_Relative timeout, GNUNET_ARM_Callback cb,
+ void *cb_cls, uint16_t type)
{
struct RequestContext *sctx;
size_t slen;
}
#if DEBUG_ARM
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- (type == GNUNET_MESSAGE_TYPE_ARM_START)
- ? _("Requesting start of service `%s'.\n")
- : _("Requesting termination of service `%s'.\n"), service_name);
+ (type ==
+ GNUNET_MESSAGE_TYPE_ARM_START) ?
+ _("Requesting start of service `%s'.\n") :
+ _("Requesting termination of service `%s'.\n"), service_name);
#endif
sctx = GNUNET_malloc (sizeof (struct RequestContext) + slen);
sctx->h = h;
msg->type = htons (sctx->type);
memcpy (&msg[1], service_name, slen);
if (GNUNET_OK !=
- GNUNET_CLIENT_transmit_and_get_response (sctx->h->client,
- msg,
+ GNUNET_CLIENT_transmit_and_get_response (sctx->h->client, msg,
GNUNET_TIME_absolute_get_remaining
(sctx->timeout), GNUNET_YES,
&handle_response, sctx))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- (type == GNUNET_MESSAGE_TYPE_ARM_START)
- ?
+ (type ==
+ GNUNET_MESSAGE_TYPE_ARM_START) ?
_
("Error while trying to transmit request to start `%s' to ARM\n")
:
* @param cb_cls closure for callback
*/
void
-GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
- const char *service_name,
+GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, const char *service_name,
struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_Callback cb, void *cb_cls)
{
sctx->cls = cb_cls;
sctx->timeout = GNUNET_TIME_relative_to_absolute (timeout);
memcpy (&sctx[1], service_name, slen);
- GNUNET_CLIENT_service_test ("arm",
- h->cfg, timeout, &arm_service_report, sctx);
+ GNUNET_CLIENT_service_test ("arm", h->cfg, timeout, &arm_service_report,
+ sctx);
return;
}
if (h->client == NULL)
* @param cb_cls closure for callback
*/
void
-GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h,
- const char *service_name,
+GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, const char *service_name,
struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_Callback cb, void *cb_cls)
{