gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3470 - in GNUnet: . src/applications/fs/fsui


From: grothoff
Subject: [GNUnet-SVN] r3470 - in GNUnet: . src/applications/fs/fsui
Date: Wed, 11 Oct 2006 18:40:36 -0700 (PDT)

Author: grothoff
Date: 2006-10-11 18:40:31 -0700 (Wed, 11 Oct 2006)
New Revision: 3470

Modified:
   GNUnet/src/applications/fs/fsui/fsui.c
   GNUnet/src/applications/fs/fsui/fsui.h
   GNUnet/src/applications/fs/fsui/search.c
   GNUnet/src/applications/fs/fsui/unindex.c
   GNUnet/src/applications/fs/fsui/upload.c
   GNUnet/todo
Log:
fix

Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c      2006-10-12 00:25:33 UTC (rev 
3469)
+++ GNUnet/src/applications/fs/fsui/fsui.c      2006-10-12 01:40:31 UTC (rev 
3470)
@@ -24,8 +24,8 @@
  * @author Christian Grothoff
  *
  * TODO:
- * - upload suspend/resume
- * - unindex suspend/resume
+ * - upload serialize/deserialize/resume
+ * - unindex deserialize/resume
  * - events for suspend (!)
  */
 
@@ -257,7 +257,7 @@
 static void writeDownloadList(struct GE_Context * ectx,
                              int fd,
                              FSUI_Context * ctx,
-                             const FSUI_DownloadList * list) {
+                             FSUI_DownloadList * list) {
   static char zero = '\0';
   static char nonzero = '+';
   int i;
@@ -696,7 +696,8 @@
                           fd,
                           ret,
                           &ret->activeDownloads);
-      doResumeEvents(ret->activeDownloads.child);
+      doResumeEvents(ret->activeDownloads.child,
+                    ret);
       /* success, read complete! */
       goto END;
     WARNL:
@@ -932,15 +933,15 @@
     ctx->unindexOperations = xpos->next;
     xpos->force_termination = YES;
     PTHREAD_STOP_SLEEP(xpos->handle);
-    PHTREAD_JOIN(xpos->handle, &unused);    
+    PTHREAD_JOIN(xpos->handle, &unused);    
     if (fd != -1) {
       WRITEINT(fd, strlen(xpos->filename));
       WRITE(fd,
            xpos->filename,
            strlen(xpos->filename));
       event.type = FSUI_unindex_suspending;
-      event.UnindexSuspending.uc.pos = xpos;
-      event.UnindexSuspending.uc.cctx = xpos->cctx;
+      event.data.UnindexSuspending.uc.pos = xpos;
+      event.data.UnindexSuspending.uc.cctx = xpos->cctx;
       ctx->ecb(ctx->ecbClosure, &event);
     }
     FREE(xpos->filename);
@@ -961,17 +962,17 @@
     if (fd != -1) {
       /* FIXME: serialize! */
       event.type = FSUI_upload_suspending;
-      event.UploadSuspending.uc.pos = upos;
-      event.UploadSuspending.uc.cctx = upos->cctx;
-      event.UploadSuspending.uc.ppos = NULL;
-      event.UploadSuspending.uc.pcctx = NULL;
+      event.data.UploadSuspending.uc.pos = upos;
+      event.data.UploadSuspending.uc.cctx = upos->cctx;
+      event.data.UploadSuspending.uc.ppos = NULL;
+      event.data.UploadSuspending.uc.pcctx = NULL;
     }
     FREE(upos->filename);
     FREENONNULL(upos->main_filename);
     ECRS_freeMetaData(upos->meta);
-    ECRS_freeURI(upos->uri);
+    ECRS_freeUri(upos->uri);
     if (upos->globalUri != NULL)
-      ECRS_freeURI(upos->globalUri);
+      ECRS_freeUri(upos->globalUri);
     EXTRACTOR_removeAll(upos->extractors);
   }
   if (fd != -1) {

Modified: GNUnet/src/applications/fs/fsui/fsui.h
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.h      2006-10-12 00:25:33 UTC (rev 
3469)
+++ GNUnet/src/applications/fs/fsui/fsui.h      2006-10-12 01:40:31 UTC (rev 
3470)
@@ -332,6 +332,8 @@
 
   struct FSUI_Context * ctx;
 
+  void * cctx;
+
   int force_termination;
 
 } FSUI_UnindexList;

Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c    2006-10-12 00:25:33 UTC (rev 
3469)
+++ GNUnet/src/applications/fs/fsui/search.c    2006-10-12 01:40:31 UTC (rev 
3470)
@@ -24,6 +24,11 @@
  *   filtering of duplicate results as well as adding boolean search
  *   (ANDing).
  * @author Christian Grothoff
+ *
+ * TODO:
+ * - make sure events are sent for resume/abort
+ *   when respective FSUI calls happen!
+ *   (initialize cctx!)
  */
 
 #include "platform.h"

Modified: GNUnet/src/applications/fs/fsui/unindex.c
===================================================================
--- GNUnet/src/applications/fs/fsui/unindex.c   2006-10-12 00:25:33 UTC (rev 
3469)
+++ GNUnet/src/applications/fs/fsui/unindex.c   2006-10-12 01:40:31 UTC (rev 
3470)
@@ -23,6 +23,11 @@
  * @brief unindex functions
  * @author Krista Bennett
  * @author Christian Grothoff
+ *
+ * TODO:
+ * - make sure events are sent for resume/abort
+ *   when respective FSUI calls happen!
+ *   (initialize cctx!)
  */
 
 #include "platform.h"

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2006-10-12 00:25:33 UTC (rev 
3469)
+++ GNUnet/src/applications/fs/fsui/upload.c    2006-10-12 01:40:31 UTC (rev 
3470)
@@ -23,6 +23,11 @@
  * @brief upload functions
  * @author Krista Bennett
  * @author Christian Grothoff
+ *
+ * TODO:
+ * - make sure events are sent for resume/abort
+ *   when respective FSUI calls happen!
+ *   (initialize cctx!)
  */
 
 #include "platform.h"

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-10-12 00:25:33 UTC (rev 3469)
+++ GNUnet/todo 2006-10-12 01:40:31 UTC (rev 3470)
@@ -18,7 +18,8 @@
     + dht/tools
   * Missing functionality: 
     + fs/fsui:
-      @ generate events for suspend, abort
+      @ generate events for suspend, abort, resume
+      @ properly initialize and destruct cctx contexts
       @ make sure new event fields are set for all events
     + uridb (?):
       @ slow gnunet-gtk iterator (see drupal)





reply via email to

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