gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21830 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r21830 - gnunet/src/fs
Date: Sat, 9 Jun 2012 21:30:21 +0200

Author: grothoff
Date: 2012-06-09 21:30:21 +0200 (Sat, 09 Jun 2012)
New Revision: 21830

Modified:
   gnunet/src/fs/fs_api.c
   gnunet/src/fs/fs_download.c
Log:
-dequeue download on error, another attempt to fix #2403

Modified: gnunet/src/fs/fs_api.c
===================================================================
--- gnunet/src/fs/fs_api.c      2012-06-09 18:33:14 UTC (rev 21829)
+++ gnunet/src/fs/fs_api.c      2012-06-09 19:30:21 UTC (rev 21830)
@@ -51,7 +51,7 @@
 {
   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 @@
   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 @@
       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 @@
   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);

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2012-06-09 18:33:14 UTC (rev 21829)
+++ gnunet/src/fs/fs_download.c 2012-06-09 19:30:21 UTC (rev 21830)
@@ -1178,6 +1178,11 @@
   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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]