[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3490 - GNUnet/src/applications/fs/fsui
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3490 - GNUnet/src/applications/fs/fsui |
Date: |
Tue, 17 Oct 2006 17:07:28 -0700 (PDT) |
Author: grothoff
Date: 2006-10-17 17:07:27 -0700 (Tue, 17 Oct 2006)
New Revision: 3490
Modified:
GNUnet/src/applications/fs/fsui/fsui.c
Log:
fix
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2006-10-17 23:22:24 UTC (rev
3489)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2006-10-18 00:07:27 UTC (rev
3490)
@@ -88,6 +88,30 @@
}
}
+static void signalUploadResume(struct FSUI_UploadList * ret,
+ FSUI_Context * ctx) {
+ FSUI_Event event;
+
+ while (ret != NULL) {
+ event.type = FSUI_upload_resumed;
+ event.data.UploadResumed.uc.pos = ret;
+ event.data.UploadResumed.uc.cctx = NULL;
+ event.data.UploadResumed.uc.ppos = ret->parent;
+ event.data.UploadResumed.uc.pcctx = ret->parent->cctx;
+ event.data.UploadResumed.completed = ret->completed;
+ event.data.UploadResumed.total = ret->total;
+ event.data.UploadResumed.anonymityLevel = ret->anonymityLevel;
+ event.data.UploadResumed.eta = 0; /* FIXME: use start_time for estimate! */
+ event.data.UploadResumed.filename = ret->filename;
+ ret->cctx = ctx->ecb(ctx->ecbClosure, &event);
+ if (ret->child != NULL)
+ signalUploadResume(ret->child,
+ ctx);
+ ret = ret->next;
+ }
+}
+
+
/**
* Start FSUI manager. Use the given progress callback to notify the
* UI about events. Start processing pending activities that were
@@ -181,19 +205,8 @@
list = list->next;
}
/* 2c) signal upload restarts */
- ulist = ret->activeUploads;
- while (ulist != NULL) {
- event.type = FSUI_upload_resumed;
- event.data.UploadResumed.uc.pos = ulist;
- event.data.UploadResumed.uc.cctx = NULL;
- event.data.UploadResumed.completed = ulist->completed;
- event.data.UploadResumed.total = ulist->total;
- event.data.UploadResumed.anonymityLevel = ulist->anonymityLevel;
- event.data.UploadResumed.eta = 0; /* FIXME: use start_time for estimate! */
- event.data.UploadResumed.filename = ulist->filename;
- ulist->cctx = cb(closure, &event);
- ulist = ulist->next;
- }
+ signalUploadResume(ret->activeUploads.child,
+ ret);
/* 2d) signal unindex restarts */
xlist = ret->unindexOperations;
while (xlist != NULL) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3490 - GNUnet/src/applications/fs/fsui,
grothoff <=