aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-09 19:30:21 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-09 19:30:21 +0000
commitc877b55ca8dc9ab33058d753698edc907dc1dbcc (patch)
treee4a37ef29f83c60cc460eb0cd88ea7d129c848d0 /src/fs/fs_api.c
parent8efb11939027e83fd74d92b8f0bf44b4f86aa4c3 (diff)
-dequeue download on error, another attempt to fix #2403
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r--src/fs/fs_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index ec959433a1..4265d8d51b 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -51,7 +51,7 @@ start_job (struct GNUNET_FS_QueueEntry *qe)
{
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;
@@ -114,7 +114,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
while (NULL != (qe = next))
{
next = qe->next;
- if (h->running_head == NULL)
+ if (NULL == h->running_head)
{
start_job (qe);
continue;
@@ -126,7 +126,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
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;
@@ -221,7 +221,7 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh)
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);