{
GNUNET_assert (NULL == qe->client);
qe->client = GNUNET_CLIENT_connect ("fs", qe->h->cfg);
- if (qe->client == NULL)
+ if (NULL == qe->client)
{
GNUNET_break (0);
return;
while (NULL != (qe = next))
{
next = qe->next;
- if (h->running_head == NULL)
+ if (NULL == h->running_head)
{
start_job (qe);
continue;
continue;
}
}
- if (h->pending_head == NULL)
+ if (NULL == h->pending_head)
return; /* no need to stop anything */
/* then, check if we should stop some jobs */
next = h->running_head;
struct GNUNET_FS_Handle *h;
h = qh->h;
- if (qh->client != NULL)
+ if (NULL != qh->client)
stop_job (qh);
GNUNET_CONTAINER_DLL_remove (h->pending_head, h->pending_tail, qh);
GNUNET_free (qh);
dc->top_request = NULL;
GNUNET_CONTAINER_multihashmap_destroy (dc->active);
dc->active = NULL;
+ if (NULL != dc->job_queue)
+ {
+ GNUNET_FS_dequeue_ (dc->job_queue);
+ dc->job_queue = NULL;
+ }
dc->pending_head = NULL;
dc->pending_tail = NULL;
GNUNET_FS_download_sync_ (dc);