/*
This file is part of GNUnet.
- (C) 2001-2012 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001-2012 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUNET_FS_dequeue_ (dc->job_queue);
dc->job_queue = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != dc->task)
+ if (NULL != dc->task)
{
GNUNET_SCHEDULER_cancel (dc->task);
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
}
if (NULL != dc->rfh)
{
struct GNUNET_FS_DownloadContext *dc = cls;
struct GNUNET_CLIENT_Connection *client;
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
client = GNUNET_CLIENT_connect ("fs", dc->h->cfg);
if (NULL == client)
{
struct GNUNET_FS_DownloadContext *dc = cls;
/* clean up state from tree encoder */
- if (dc->task != GNUNET_SCHEDULER_NO_TASK)
+ if (dc->task != NULL)
{
GNUNET_SCHEDULER_cancel (dc->task);
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
}
if (NULL != dc->rfh)
{
{
struct GNUNET_FS_DownloadContext *dc = cls;
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
GNUNET_FS_tree_encoder_next (dc->te);
}
struct GNUNET_DISK_FileHandle *fh;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Start task running...\n");
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
if (0 == dc->length)
{
/* no bytes required! */
if (NULL != dc->parent)
GNUNET_CONTAINER_DLL_remove (dc->parent->child_head, dc->parent->child_tail,
dc);
- if (GNUNET_SCHEDULER_NO_TASK != dc->task)
+ if (NULL != dc->task)
{
GNUNET_SCHEDULER_cancel (dc->task);
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
}
pi.status = GNUNET_FS_STATUS_DOWNLOAD_SUSPEND;
GNUNET_FS_download_make_status_ (&pi, dc);
{
GNUNET_FS_download_stop (sr->probe_ctx, GNUNET_YES);
sr->probe_ctx = NULL;
- }
- if (GNUNET_SCHEDULER_NO_TASK != sr->probe_ping_task)
- {
- GNUNET_SCHEDULER_cancel (sr->probe_ping_task);
- sr->probe_ping_task = GNUNET_SCHEDULER_NO_TASK;
+ GNUNET_FS_stop_probe_ping_task_ (sr);
}
return dc;
}
pi.status = GNUNET_FS_STATUS_DOWNLOAD_ACTIVE;
GNUNET_FS_download_make_status_ (&pi, dc);
-
+
dc->job_queue =
GNUNET_FS_queue_ (dc->h, &activate_fs_download, &deactivate_fs_download,
dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE,
(0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE))
? GNUNET_FS_QUEUE_PRIORITY_NORMAL
: GNUNET_FS_QUEUE_PRIORITY_PROBE);
-
+
}
if (NULL != dc->top)
GNUNET_FS_end_top (dc->h, dc->top);
- if (GNUNET_SCHEDULER_NO_TASK != dc->task)
+ if (NULL != dc->task)
{
GNUNET_SCHEDULER_cancel (dc->task);
- dc->task = GNUNET_SCHEDULER_NO_TASK;
+ dc->task = NULL;
}
search_was_null = (NULL == dc->search);
if (NULL != dc->search)