/*
This file is part of GNUnet.
- Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2013 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
ch->audio_data = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending %u bytes of audio data from line %u to remote line %u via cadet\n",
- ch->audio_size, ch->line->local_line, ch->remote_line);
+ (unsigned int) ch->audio_size,
+ ch->line->local_line,
+ ch->remote_line);
return sizeof (struct CadetAudioMessage) + ch->audio_size;
}
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data for non-existing line %u, dropping.\n",
- msize, ntohl (msg->remote_line));
+ (unsigned int) msize,
+ ntohl (msg->remote_line));
return GNUNET_SYSERR;
}
if (NULL == ch)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data for unknown sender.\n",
- msize);
+ (unsigned int) msize);
return GNUNET_SYSERR;
}
if ((GNUNET_YES == ch->suspended_local) || (GNUNET_YES == ch->suspended_remote))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %u bytes of AUDIO data on suspended channel CID %u:(%u:%u); dropping\n",
- msize, ch->cid, ch->remote_line, line->local_line);
+ (unsigned int) msize,
+ ch->cid,
+ ch->remote_line,
+ line->local_line);
GNUNET_CADET_receive_done (channel);
return GNUNET_OK;
}
GNUNET_CADET_receive_done (channel);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Forwarding %u bytes of AUDIO data to client CID %u:(%u:%u)\n",
- msize, ch->cid, ch->remote_line, ch->line->local_line);
+ (unsigned int) msize,
+ ch->cid,
+ ch->remote_line,
+ ch->line->local_line);
cam = (struct ClientAudioMessage *) buf;
cam->header.size = htons (sizeof (buf));
cam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
* Shutdown nicely
*
* @param cls closure, NULL
- * @param tc the task context
*/
static void
-do_shutdown (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown (void *cls)
{
struct Line *line;
struct Channel *ch;
}
nc = GNUNET_SERVER_notification_context_create (server, 16);
GNUNET_SERVER_add_handlers (server, server_handlers);
- GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &do_shutdown,
- NULL);
+ GNUNET_SERVER_disconnect_notify (server,
+ &handle_client_disconnect,
+ NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+ NULL);
}