[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7329 - GNUnet/src/applications/fs/fsui
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7329 - GNUnet/src/applications/fs/fsui |
Date: |
Thu, 26 Jun 2008 00:31:57 -0600 (MDT) |
Author: grothoff
Date: 2008-06-26 00:31:57 -0600 (Thu, 26 Jun 2008)
New Revision: 7329
Modified:
GNUnet/src/applications/fs/fsui/fsui.c
Log:
fixing mantis 1377
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2008-06-26 06:07:53 UTC (rev
7328)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2008-06-26 06:31:57 UTC (rev
7329)
@@ -650,6 +650,20 @@
}
}
+static void
+suspend_active_upload(struct GNUNET_FSUI_UploadList * ul)
+{
+ while (ul != NULL)
+ {
+ if (ul->state == GNUNET_FSUI_ACTIVE)
+ {
+ ul->state = GNUNET_FSUI_PENDING;
+ suspend_active_upload(ul->child);
+ }
+ ul = ul->next;
+ }
+}
+
/**
* Stop all processes under FSUI control (serialize state, continue
* later if possible).
@@ -746,6 +760,7 @@
}
/* 1d) stop uploading */
upos = ctx->activeUploads.child;
+ suspend_active_upload(upos);
while (upos != NULL)
{
if ((upos->state == GNUNET_FSUI_ACTIVE) ||
@@ -755,8 +770,6 @@
{
/* NOTE: will force transitive termination
of rest of tree! */
- if (upos->state == GNUNET_FSUI_ACTIVE)
- upos->state = GNUNET_FSUI_PENDING;
GNUNET_thread_stop_sleep (upos->shared->handle);
GNUNET_thread_join (upos->shared->handle, &unused);
if (upos->state != GNUNET_FSUI_PENDING)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7329 - GNUnet/src/applications/fs/fsui,
gnunet <=