/*
This file is part of GNUnet.
- Copyright (C) 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011 GNUnet e.V.
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-
/**
* @file cadet/cadet_api.c
* @brief cadet api: client implementation of new cadet service
* Notify client that the transmission has timed out
*
* @param cls closure
- * @param tc task context
*/
static void
-timeout_transmission (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+timeout_transmission (void *cls)
{
struct GNUNET_CADET_TransmitHandle *th = cls;
struct GNUNET_CADET_Handle *cadet = th->channel->cadet;
/**
* Reconnect callback: tries to reconnect again after a failer previous
- * reconnecttion
+ * reconnection.
+ *
* @param cls closure (cadet handle)
- * @param tc task context
*/
static void
-reconnect_cbk (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+reconnect_cbk (void *cls);
/**
/**
* Reconnect callback: tries to reconnect again after a failer previous
* reconnecttion
+ *
* @param cls closure (cadet handle)
- * @param tc task context
*/
static void
-reconnect_cbk (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+reconnect_cbk (void *cls)
{
struct GNUNET_CADET_Handle *h = cls;
h->reconnect_task = NULL;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
do_reconnect (h);
}
*
* @param h handle to the cadet
*
- * @return GNUNET_YES in case of sucess, GNUNET_NO otherwise (service down...)
+ * @return #GNUNET_YES in case of sucess, #GNUNET_NO otherwise (service down...)
*/
static void
reconnect (struct GNUNET_CADET_Handle *h)
if (msize != esize)
{
GNUNET_break_op (0);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "m:%u, e: %u\n", msize, esize);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "m:%u, e: %u\n",
+ (unsigned int) msize,
+ (unsigned int) esize);
h->info_cb.peer_cb (h->info_cls, NULL, 0, 0, 0, NULL);
goto clean_cls;
}
if (msize != esize)
{
GNUNET_break_op (0);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "m:%u, e: %u (%u ch, %u conn)\n",
- msize, esize, ch_n, c_n);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%u (%u ch, %u conn)\n",
- sizeof (struct GNUNET_CADET_LocalInfoTunnel),
- sizeof (CADET_ChannelNumber), sizeof (struct GNUNET_HashCode));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "m:%u, e: %u (%u ch, %u conn)\n",
+ (unsigned int) msize,
+ (unsigned int) esize,
+ ch_n,
+ c_n);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%u (%u ch, %u conn)\n",
+ (unsigned int) sizeof (struct GNUNET_CADET_LocalInfoTunnel),
+ (unsigned int) sizeof (CADET_ChannelNumber),
+ (unsigned int) sizeof (struct GNUNET_HashCode));
h->info_cb.tunnel_cb (h->info_cls, NULL, 0, 0, NULL, NULL, 0, 0);
goto clean_cls;
}
NULL); /* no handler cls */
return mq;
}
-