GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO);
sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg);
GNUNET_assert (NULL != sc->h->client);
- GNUNET_CLIENT_ignore_shutdown (sc->h->client, GNUNET_YES);
if (sc->callback != NULL)
sc->callback (sc->cls, GNUNET_SYSERR);
GNUNET_free (sc);
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
"arm_api, GNUNET_CLIENT_connect returned non-NULL\n");
- GNUNET_CLIENT_ignore_shutdown (client, GNUNET_YES);
h->client = client;
}
LOG (GNUNET_ERROR_TYPE_DEBUG, "arm_api, h->client non-NULL\n");
cb (cb_cls, GNUNET_SYSERR);
return;
}
- GNUNET_CLIENT_ignore_shutdown (client, GNUNET_YES);
h->client = client;
}
if (0 == strcasecmp ("arm", service_name))
if (size < sizeof (struct GNUNET_MessageHeader))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Failed to transmit shutdown request to client.\n"));
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR);
GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
const struct GNUNET_CONFIGURATION_Handle *cfg);
-/**
- * Configure this connection to ignore shutdown signals.
- *
- * @param h client handle
- * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
- */
-void
-GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
- int do_ignore);
-
-
-
/**
* Destroy connection with the service. This will automatically
* cancel any pending "receive" request (however, the handler will
*/
int in_receive;
- /**
- * Are we ignoring shutdown signals?
- */
- int ignore_shutdown;
-
/**
* How often have we tried to connect?
*/
}
-/**
- * Configure this connection to ignore shutdown signals.
- *
- * @param h client handle
- * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
- */
-void
-GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
- int do_ignore)
-{
- h->ignore_shutdown = do_ignore;
- if (h->sock != NULL)
- GNUNET_CONNECTION_ignore_shutdown (h->sock, do_ignore);
-}
-
-
/**
* Destroy connection with the service. This will automatically
* cancel any pending "receive" request (however, the handler will
GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th);
return;
}
- GNUNET_CONNECTION_ignore_shutdown (th->sock->sock,
- th->sock->ignore_shutdown);
th->th =
GNUNET_CONNECTION_notify_transmit_ready (th->sock->sock, th->size,
GNUNET_TIME_absolute_get_remaining
GNUNET_assert (sock->nth.timeout_task == GNUNET_SCHEDULER_NO_TASK);
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
- if (sock->ignore_shutdown == GNUNET_YES)
+ if ( (sock->ignore_shutdown == GNUNET_YES) &&
+ (NULL != sock->sock) )
goto SCHEDULE_WRITE; /* ignore shutdown, go again immediately */
#if DEBUG_CONNECTION
LOG (GNUNET_ERROR_TYPE_DEBUG,