void *receive_handler_cls;
GNUNET_assert (GNUNET_NO == client->msg_complete);
+ GNUNET_assert (GNUNET_YES == client->in_receive);
client->in_receive = GNUNET_NO;
if ((0 == available) || (NULL == client->connection) || (0 != errCode))
{
}
else
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "calling GNUNET_CONNECTION_receive\n");
GNUNET_assert (GNUNET_NO == client->in_receive);
client->in_receive = GNUNET_YES;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "calling GNUNET_CONNECTION_receive\n");
GNUNET_CONNECTION_receive (client->connection, GNUNET_SERVER_MAX_MESSAGE_SIZE - 1,
timeout, &receive_helper, client);
}
*
* @param connection connection handle
* @param max maximum number of bytes to read
- * @param timeout maximum amount of time to wait (use -1 for "forever")
+ * @param timeout maximum amount of time to wait
* @param receiver function to call with received data
* @param receiver_cls closure for receiver
*/
{
GNUNET_assert ((GNUNET_SCHEDULER_NO_TASK == connection->read_task) &&
(NULL == connection->receiver));
+ GNUNET_assert (NULL != receiver);
connection->receiver = receiver;
connection->receiver_cls = receiver_cls;
connection->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout);