gnunet-svn
[Top][All Lists]
Advanced

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

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


From: grothoff
Subject: [GNUnet-SVN] r3525 - in GNUnet: . src/applications/fs/fsui
Date: Sat, 21 Oct 2006 11:58:36 -0700 (PDT)

Author: grothoff
Date: 2006-10-21 11:58:32 -0700 (Sat, 21 Oct 2006)
New Revision: 3525

Modified:
   GNUnet/src/applications/fs/fsui/upload.c
   GNUnet/todo
Log:
use extractors in upload

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2006-10-21 06:28:52 UTC (rev 
3524)
+++ GNUnet/src/applications/fs/fsui/upload.c    2006-10-21 18:58:32 UTC (rev 
3525)
@@ -23,9 +23,6 @@
  * @brief upload functions
  * @author Krista Bennett
  * @author Christian Grothoff
- *
- * TODO:
- * - use extractors to obtain metadata and keywords!
  */
 
 #include "platform.h"
@@ -204,6 +201,7 @@
   int ret;
   struct GE_Context * ectx;
   char * filename;
+  struct ECRS_URI * uri;
 
   if (utc->parent == &utc->shared->ctx->activeUploads) {
     /* top-level call: signal client! */
@@ -231,8 +229,7 @@
   } else {
     filename = STRDUP(utc->filename);
   }  
-  utc->start_time = get_time();
-    
+  utc->start_time = get_time();    
   ret = ECRS_uploadFile(utc->shared->ctx->ectx,
                        utc->shared->ctx->cfg,
                        filename,
@@ -266,10 +263,12 @@
     FREE(filename);
     return NULL;
   }
-
-  /* FIXME: metadata extraction! */
-
   utc->state = FSUI_COMPLETED;
+  if (utc->child == NULL)
+    ECRS_extractMetaData(utc->shared->ctx->ectx,
+                        utc->meta,
+                        utc->filename,
+                        utc->shared->extractors);
   ECRS_delFromMetaData(utc->meta,
                       EXTRACTOR_FILENAME,
                       NULL);
@@ -302,6 +301,18 @@
                       utc->shared->expiration,
                       utc->uri,
                       utc->meta);          
+  if (utc->shared->individualKeywords == YES) {
+    uri = ECRS_metaDataToUri(utc->meta);
+    ECRS_addToKeyspace(ectx,
+                      utc->shared->ctx->cfg,
+                      uri,
+                      utc->shared->anonymityLevel,
+                      utc->shared->priority,
+                      utc->shared->expiration,
+                      utc->uri,
+                      utc->meta);          
+    ECRS_freeUri(uri);
+  }
   event.type = FSUI_upload_completed;
   event.data.UploadCompleted.uc.pos = utc;
   event.data.UploadCompleted.uc.cctx = utc->cctx;

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-10-21 06:28:52 UTC (rev 3524)
+++ GNUnet/todo 2006-10-21 18:58:32 UTC (rev 3525)
@@ -18,7 +18,6 @@
     + dht/tools
   * Missing functionality: 
     + fs/fsui:
-      @ upload: use extractors!
       @ better ETA calculations
       @ make sure new event fields are set for all events
     + fs/fslib: error handing
@@ -40,11 +39,11 @@
   * ncurses wizard
   * Scheme (scm) specification of entire configuration
 - fix known bugs (see Mantis for updates):
-  * file/socket leak (#955)
+  * file/socket leak (#955) - possibly fixed
   * Windows installer, uninstall: Remove account [Nils, RC]
 
 
-0.7.2 ['06] (aka "performance"):
+0.7.2 ['06]:
 - Transports:
   * SMTP/HTTP (using libcurl, libmicrohttpd, libesmtp)
 - Features:





reply via email to

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