gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1571 - Extractor/po Extractor-docs/WWW GNUnet GNUnet/src/a


From: grothoff
Subject: [GNUnet-SVN] r1571 - Extractor/po Extractor-docs/WWW GNUnet GNUnet/src/applications/fs/ecrs GNUnet/src/applications/fs/fsui GNUnet/src/applications/fs/module GNUnet/src/applications/fs/tools GNUnet/src/include GNUnet/src/server GNUnet/src/util gnunet-gtk/src/plugins/fs
Date: Sun, 17 Jul 2005 05:25:21 -0700 (PDT)

Author: grothoff
Date: 2005-07-17 05:24:55 -0700 (Sun, 17 Jul 2005)
New Revision: 1571

Modified:
   Extractor-docs/WWW/index.php
   Extractor/po/de.po
   Extractor/po/libextractor.pot
   Extractor/po/ro.po
   Extractor/po/rw.po
   GNUnet/ChangeLog
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/ecrs/namespace.c
   GNUnet/src/applications/fs/ecrs/namespacetest.c
   GNUnet/src/applications/fs/ecrs/search.c
   GNUnet/src/applications/fs/fsui/collection.c
   GNUnet/src/applications/fs/fsui/namespace_info.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/include/ecrs_core.h
   GNUnet/src/include/gnunet_ecrs_lib.h
   GNUnet/src/include/gnunet_fsui_lib.h
   GNUnet/src/server/connection.c
   GNUnet/src/util/vector.c
   gnunet-gtk/src/plugins/fs/collection.c
   gnunet-gtk/src/plugins/fs/helper.c
   gnunet-gtk/src/plugins/fs/helper.h
   gnunet-gtk/src/plugins/fs/namespace.c
Log:
assorted bugfixes

Modified: Extractor/po/de.po
===================================================================
--- Extractor/po/de.po  2005-07-17 10:42:29 UTC (rev 1570)
+++ Extractor/po/de.po  2005-07-17 12:24:55 UTC (rev 1571)
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: libextractor 0.5.0\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2005-07-14 21:56+0200\n"
+"POT-Creation-Date: 2005-07-16 23:06+0200\n"
 "PO-Revision-Date: 2005-06-22 15:05+0200\n"
 "Last-Translator: Karl Eichwalder <address@hidden>\n"
 "Language-Team: German <address@hidden>\n"
@@ -877,12 +877,12 @@
 msgid "Extract metadata from files."
 msgstr "Metadaten aus den Dateien extrahieren."
 
-#: src/main/extract.c:198 src/main/extractor.c:803
+#: src/main/extract.c:198 src/main/extractor.c:805
 #, c-format
 msgid "%s - (binary)\n"
 msgstr "%s - (binär)\n"
 
-#: src/main/extract.c:204 src/main/extractor.c:808
+#: src/main/extract.c:204 src/main/extractor.c:810
 #, c-format
 msgid "INVALID TYPE - %s\n"
 msgstr "UNGÜLTIGE ART - %s\n"
@@ -935,24 +935,24 @@
 msgid "page count"
 msgstr "Seitenanzahl"
 
-#: src/main/extract.c:472
+#: src/main/extract.c:473
 #, c-format
 msgid "You must specify an argument for the '%s' option (option ignored).\n"
 msgstr ""
 "Sie müssen ein Argument für die Option »%s« angeben (Option wird "
 "ignoriert).\n"
 
-#: src/main/extract.c:539
+#: src/main/extract.c:540
 #, c-format
 msgid "Use --help to get a list of options.\n"
 msgstr "Verwenden Sie --help, um eine Liste aller Optionen zu sehen.\n"
 
-#: src/main/extract.c:598
+#: src/main/extract.c:599
 #, c-format
 msgid "%% BiBTeX file\n"
 msgstr "%% BibTeX Datei\n"
 
-#: src/main/extract.c:605
+#: src/main/extract.c:606
 #, c-format
 msgid "Keywords for file %s:\n"
 msgstr "Schlüsselwörter für die Datei %s:\n"
@@ -1263,24 +1263,24 @@
 msgid "orientation"
 msgstr "Seitenausrichtung"
 
-#: src/main/extractor.c:211
+#: src/main/extractor.c:213
 #, c-format
 msgid "Initialization of plugin mechanism failed: %s!\n"
 msgstr "Initialisierung des Plugin-Mechanismus' ist fehlgeschlagen: %s.\n"
 
-#: src/main/extractor.c:358
+#: src/main/extractor.c:360
 #, c-format
 msgid ""
 "Resolving symbol '%s' in library '%s' failed, so I tried '%s', but that "
 "failed also.  Errors are: '%s' and '%s'.\n"
 msgstr ""
 
-#: src/main/extractor.c:387
+#: src/main/extractor.c:389
 #, c-format
 msgid "Loading '%s' plugin failed: %s\n"
 msgstr "Laden des »%s«-Plugins ist fehlgeschlagen: %s\n"
 
-#: src/main/extractor.c:592
+#: src/main/extractor.c:594
 #, c-format
 msgid "Unloading plugin '%s' failed!\n"
 msgstr "Entladen des »%s«-Erweiterung ist fehlgeschlagen.\n"

Modified: Extractor/po/libextractor.pot
===================================================================
--- Extractor/po/libextractor.pot       2005-07-17 10:42:29 UTC (rev 1570)
+++ Extractor/po/libextractor.pot       2005-07-17 12:24:55 UTC (rev 1571)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2005-07-14 21:56+0200\n"
+"POT-Creation-Date: 2005-07-16 23:06+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <address@hidden>\n"
 "Language-Team: LANGUAGE <address@hidden>\n"
@@ -858,12 +858,12 @@
 msgid "Extract metadata from files."
 msgstr ""
 
-#: src/main/extract.c:198 src/main/extractor.c:803
+#: src/main/extract.c:198 src/main/extractor.c:805
 #, c-format
 msgid "%s - (binary)\n"
 msgstr ""
 
-#: src/main/extract.c:204 src/main/extractor.c:808
+#: src/main/extract.c:204 src/main/extractor.c:810
 #, c-format
 msgid "INVALID TYPE - %s\n"
 msgstr ""
@@ -916,22 +916,22 @@
 msgid "page count"
 msgstr ""
 
-#: src/main/extract.c:472
+#: src/main/extract.c:473
 #, c-format
 msgid "You must specify an argument for the '%s' option (option ignored).\n"
 msgstr ""
 
-#: src/main/extract.c:539
+#: src/main/extract.c:540
 #, c-format
 msgid "Use --help to get a list of options.\n"
 msgstr ""
 
-#: src/main/extract.c:598
+#: src/main/extract.c:599
 #, c-format
 msgid "%% BiBTeX file\n"
 msgstr ""
 
-#: src/main/extract.c:605
+#: src/main/extract.c:606
 #, c-format
 msgid "Keywords for file %s:\n"
 msgstr ""
@@ -1240,24 +1240,24 @@
 msgid "orientation"
 msgstr ""
 
-#: src/main/extractor.c:211
+#: src/main/extractor.c:213
 #, c-format
 msgid "Initialization of plugin mechanism failed: %s!\n"
 msgstr ""
 
-#: src/main/extractor.c:358
+#: src/main/extractor.c:360
 #, c-format
 msgid ""
 "Resolving symbol '%s' in library '%s' failed, so I tried '%s', but that "
 "failed also.  Errors are: '%s' and '%s'.\n"
 msgstr ""
 
-#: src/main/extractor.c:387
+#: src/main/extractor.c:389
 #, c-format
 msgid "Loading '%s' plugin failed: %s\n"
 msgstr ""
 
-#: src/main/extractor.c:592
+#: src/main/extractor.c:594
 #, c-format
 msgid "Unloading plugin '%s' failed!\n"
 msgstr ""

Modified: Extractor/po/ro.po
===================================================================
--- Extractor/po/ro.po  2005-07-17 10:42:29 UTC (rev 1570)
+++ Extractor/po/ro.po  2005-07-17 12:24:55 UTC (rev 1571)
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: libextractor 0.4.2\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2005-07-14 21:56+0200\n"
+"POT-Creation-Date: 2005-07-16 23:06+0200\n"
 "PO-Revision-Date: 2005-02-25 12:00-0500\n"
 "Last-Translator: Laurentiu Buzdugan <address@hidden>\n"
 "Language-Team: Romanian <address@hidden>\n"
@@ -880,12 +880,12 @@
 msgid "Extract metadata from files."
 msgstr "Extrage metadata din fi�iere."
 
-#: src/main/extract.c:198 src/main/extractor.c:803
+#: src/main/extract.c:198 src/main/extractor.c:805
 #, c-format
 msgid "%s - (binary)\n"
 msgstr "%s - (binar)\n"
 
-#: src/main/extract.c:204 src/main/extractor.c:808
+#: src/main/extract.c:204 src/main/extractor.c:810
 #, c-format
 msgid "INVALID TYPE - %s\n"
 msgstr "TIP INVALID - %s\n"
@@ -938,23 +938,23 @@
 msgid "page count"
 msgstr "num�r de pagini"
 
-#: src/main/extract.c:472
+#: src/main/extract.c:473
 #, c-format
 msgid "You must specify an argument for the '%s' option (option ignored).\n"
 msgstr ""
 "Trebuie s� specifica�i un argument pentru op�iunea '%s' (op�iune ignorat�).\n"
 
-#: src/main/extract.c:539
+#: src/main/extract.c:540
 #, c-format
 msgid "Use --help to get a list of options.\n"
 msgstr "Folosi�i --help pentru a ob�ine o list� de op�iuni.\n"
 
-#: src/main/extract.c:598
+#: src/main/extract.c:599
 #, c-format
 msgid "%% BiBTeX file\n"
 msgstr "%% BiBTeX file\n"
 
-#: src/main/extract.c:605
+#: src/main/extract.c:606
 #, c-format
 msgid "Keywords for file %s:\n"
 msgstr "Cuvinte cheie pentru fi�ier %s:\n"
@@ -1265,12 +1265,12 @@
 msgid "orientation"
 msgstr "orientare pagin�"
 
-#: src/main/extractor.c:211
+#: src/main/extractor.c:213
 #, c-format
 msgid "Initialization of plugin mechanism failed: %s!\n"
 msgstr "ini�ializare mecanismului de plugin a e�uat: %s!\n"
 
-#: src/main/extractor.c:358
+#: src/main/extractor.c:360
 #, c-format
 msgid ""
 "Resolving symbol '%s' in library '%s' failed, so I tried '%s', but that "
@@ -1279,12 +1279,12 @@
 "Rezolvarea simbolului '%s' �n biblioteca '%s' a e�uat, a�a c� am �ncercat '%"
 "s', dar �i acesta a e�uat.  Erorile sunt: '%s' �i '%s'.\n"
 
-#: src/main/extractor.c:387
+#: src/main/extractor.c:389
 #, c-format
 msgid "Loading '%s' plugin failed: %s\n"
 msgstr "�nc�rcarea plugin-ului '%s' a e�uat: %s\n"
 
-#: src/main/extractor.c:592
+#: src/main/extractor.c:594
 #, c-format
 msgid "Unloading plugin '%s' failed!\n"
 msgstr "Desc�rcarea plugin-ului '%s' a e�uat!\n"

Modified: Extractor/po/rw.po
===================================================================
--- Extractor/po/rw.po  2005-07-17 10:42:29 UTC (rev 1570)
+++ Extractor/po/rw.po  2005-07-17 12:24:55 UTC (rev 1571)
@@ -16,7 +16,7 @@
 msgstr ""
 "Project-Id-Version: libextractor 0.3.11\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2005-07-14 21:56+0200\n"
+"POT-Creation-Date: 2005-07-16 23:06+0200\n"
 "PO-Revision-Date: 2005-04-04 10:55-0700\n"
 "Last-Translator: Steven Michael Murphy <address@hidden>\n"
 "Language-Team: Kinyarwanda <address@hidden>\n"
@@ -899,12 +899,12 @@
 msgid "Extract metadata from files."
 msgstr "Bivuye Idosiye"
 
-#: src/main/extract.c:198 src/main/extractor.c:803
+#: src/main/extract.c:198 src/main/extractor.c:805
 #, c-format
 msgid "%s - (binary)\n"
 msgstr ""
 
-#: src/main/extract.c:204 src/main/extractor.c:808
+#: src/main/extract.c:204 src/main/extractor.c:810
 #, c-format
 msgid "INVALID TYPE - %s\n"
 msgstr ""
@@ -980,22 +980,22 @@
 msgid "page count"
 msgstr "Kubara amapaje"
 
-#: src/main/extract.c:472
+#: src/main/extract.c:473
 #, fuzzy, c-format
 msgid "You must specify an argument for the '%s' option (option ignored).\n"
 msgstr "kugirango i Ihitamo Ihitamo"
 
-#: src/main/extract.c:539
+#: src/main/extract.c:540
 #, fuzzy, c-format
 msgid "Use --help to get a list of options.\n"
 msgstr "Ifashayobora Kuri Kubona a Urutonde Bya Amahitamo"
 
-#: src/main/extract.c:598
+#: src/main/extract.c:599
 #, c-format
 msgid "%% BiBTeX file\n"
 msgstr ""
 
-#: src/main/extract.c:605
+#: src/main/extract.c:606
 #, fuzzy, c-format
 msgid "Keywords for file %s:\n"
 msgstr "kugirango IDOSIYE"
@@ -1368,24 +1368,24 @@
 msgid "orientation"
 msgstr "Ipaji Icyerekezo"
 
-#: src/main/extractor.c:211
+#: src/main/extractor.c:213
 #, fuzzy, c-format
 msgid "Initialization of plugin mechanism failed: %s!\n"
 msgstr "Bya Byanze"
 
-#: src/main/extractor.c:358
+#: src/main/extractor.c:360
 #, fuzzy, c-format
 msgid ""
 "Resolving symbol '%s' in library '%s' failed, so I tried '%s', but that "
 "failed also.  Errors are: '%s' and '%s'.\n"
 msgstr "IKIMENYETSO in Isomero Byanze Byanze Na"
 
-#: src/main/extractor.c:387
+#: src/main/extractor.c:389
 #, fuzzy, c-format
 msgid "Loading '%s' plugin failed: %s\n"
 msgstr "Byanze"
 
-#: src/main/extractor.c:592
+#: src/main/extractor.c:594
 #, fuzzy, c-format
 msgid "Unloading plugin '%s' failed!\n"
 msgstr "Byanze"

Modified: Extractor-docs/WWW/index.php
===================================================================
--- Extractor-docs/WWW/index.php        2005-07-17 10:42:29 UTC (rev 1570)
+++ Extractor-docs/WWW/index.php        2005-07-17 12:24:55 UTC (rev 1571)
@@ -2,7 +2,7 @@
 $title="libextractor - a simple library for keyword extraction";
 $description="a simple library for keyword extraction";
 $email="address@hidden";       
-$keywords="keyword, extraction, mp3, html, pdf, images, jpeg, gif, ps, mime, 
real, qt, asf, mpeg, avi, riff, tiff, summary, summaries, kbps, format, 
mime-type, zip, elf, doc, ppt, xls, sha-1, md5, open office, sxw, dvi, id3, 
id3v2, id3v2.3, id3v2.4, thumbnails";
+$keywords="keyword, extraction, mp3, html, pdf, images, jpeg, gif, ps, mime, 
real, qt, asf, mpeg, avi, riff, tiff, summary, summaries, kbps, format, 
mime-type, zip, elf, doc, ppt, xls, sha-1, md5, open office, sxw, dvi, id3, 
id3v2, id3v2.3, id3v2.4, thumbnails, exiv2";
 $author="Vids Samanta and Christian Grothoff"; 
 $page="home";  
 include("html_header.php3");
@@ -37,6 +37,8 @@
 H2("Recent News");
 P();
 echo "<dl>";
+DTDD("Thu Jul 14 22:31:28 CEST 2005 | libextractor v0.5.2 released.",
+     "This release adds support for exiv2.  The API was extended to support 
in-memory metadata extraction (no file required).  Also new are functions to 
encode and decode the binary metadata of a thumbnail.  Various plugins were 
changed to allow for the in-memory metadata extraction.  A minor compile error 
was fixed.");
 DTDD("Mon Jul  4 18:24:18 CEST 2005 | libextractor v0.5.1 released.",
      "This release moves the Java and Python bindings into seperate packages.  
The new version improves the build system and contains some code cleanups.");
 DTDD("Sun May 21 13:58:52 CET 2005 | libextractor v0.5.0 released.",

Modified: GNUnet/ChangeLog
===================================================================
--- GNUnet/ChangeLog    2005-07-17 10:42:29 UTC (rev 1570)
+++ GNUnet/ChangeLog    2005-07-17 12:24:55 UTC (rev 1571)
@@ -1,3 +1,8 @@
+Sun Jul 17 13:49:40 CEST 2005
+       Fixed problems with struct alignment on 64-bit 
+       AMDs.  Fixed recently introduced memory leak.
+       Fixed various compiler warnings.
+       
 Sat Jul 16 23:55:31 CEST 2005
        Fixed various minor problems with platforms
        without gettext/NLS support and for 64-bit size_ts.

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/applications/fs/ecrs/download.c  2005-07-17 12:24:55 UTC (rev 
1571)
@@ -862,8 +862,8 @@
   size = ntohl(reply->size) - sizeof(Datastore_Value);
   if ( (size <= sizeof(DBlock)) ||
        (size - sizeof(DBlock) != getNodeSize(node)) ) {
-    printf("Received %u bytes, expected %u\n",
-          size - sizeof(DBlock),
+    printf("Received %llu bytes, expected %u\n",
+          (unsigned long long) (size - sizeof(DBlock)),
           getNodeSize(node));
     BREAK();
     return SYSERR; /* invalid size! */

Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2005-07-17 12:24:55 UTC (rev 
1571)
@@ -347,8 +347,8 @@
                    unsigned int anonymityLevel,
                    unsigned int priority,
                    cron_t expiration,
-                   cron_t creationTime,
-                   cron_t updateInterval,
+                   TIME_T creationTime,
+                   TIME_T updateInterval,
                    const HashCode512 * thisId,
                    const HashCode512 * nextId,
                    const struct ECRS_URI * dstU,
@@ -442,8 +442,8 @@
   value->expirationTime = htonll(expiration);
 
   /* update SBlock specific data */
-  sb->creationTime = htonll(creationTime);
-  sb->updateInterval = htonll(updateInterval);
+  sb->creationTime = htonl(creationTime);
+  sb->updateInterval = htonl(updateInterval);
   sb->nextIdentifier = *nextId;
 
   deltaId(thisId,

Modified: GNUnet/src/applications/fs/ecrs/namespacetest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespacetest.c     2005-07-17 10:42:29 UTC 
(rev 1570)
+++ GNUnet/src/applications/fs/ecrs/namespacetest.c     2005-07-17 12:24:55 UTC 
(rev 1571)
@@ -68,8 +68,8 @@
   CHECK(OK == ECRS_addToNamespace(CHECKNAME,
                                  0,
                                  0,
-                                 cronTime(NULL) + 5 * cronMINUTES,
-                                 cronTime(NULL),
+                                 TIME(NULL) + 300,
+                                 TIME(NULL),
                                  1 * cronMINUTES,
                                  &thisId,
                                  &nextId,

Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c    2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/applications/fs/ecrs/search.c    2005-07-17 12:24:55 UTC (rev 
1571)
@@ -227,37 +227,37 @@
  * @param c the resulting current ID (set)
  */
 static int computeIdAtTime(const SBlock * sb,
-                          cron_t now,
+                          TIME_T now,
                           HashCode512 * c) {
-  cron_t pos;
+  TIME_T pos;
   HashCode512 tmp;
   unsigned int iter;
 
-  if (ntohll(sb->updateInterval) == (cron_t) SBLOCK_UPDATE_SPORADIC) {
+  if (ntohl(sb->updateInterval) == SBLOCK_UPDATE_SPORADIC) {
     memcpy(c,
           &sb->nextIdentifier,
           sizeof(HashCode512));
     return OK;
   }
-  if (ntohll(sb->updateInterval) == (cron_t) SBLOCK_UPDATE_NONE) {
+  if (ntohl(sb->updateInterval) == SBLOCK_UPDATE_NONE) {
     /* H(N-I)^S is the current routing key, so N-I = k */
     deltaId(&sb->identifierIncrement,
            &sb->nextIdentifier,
            c);
     return OK;
   }
-  GNUNET_ASSERT(ntohll(sb->updateInterval) != 0);
-  pos = ntohll(sb->creationTime);
+  GNUNET_ASSERT(ntohl(sb->updateInterval) != 0);
+  pos = ntohl(sb->creationTime);
   deltaId(&sb->identifierIncrement,
          &sb->nextIdentifier,
          c);
 
-  iter = (now - (pos + ntohll(sb->updateInterval))) / 
ntohll(sb->updateInterval);
+  iter = (now - (pos + ntohl(sb->updateInterval))) / ntohl(sb->updateInterval);
   if (iter > 0xFFFF)
     /* too many iterators, signal error! */
     return SYSERR;
-  while (pos + ntohll(sb->updateInterval) < now) {
-    pos += ntohll(sb->updateInterval);
+  while (pos + ntohl(sb->updateInterval) < now) {
+    pos += ntohl(sb->updateInterval);
     addHashCodes(c,
                 &sb->identifierIncrement,
                 &tmp);
@@ -428,7 +428,7 @@
        SBlock * sb;
        const char * dstURI;
        int j;
-       cron_t now;
+       TIME_T now;
        HashCode512 updateId;
        URI updateURI;
        
@@ -478,8 +478,10 @@
 
        /* compute current/NEXT URI (if updateable SBlock) and issue
           respective query automatically! */
-       cronTime(&now); 
-       if (OK != computeIdAtTime(sb, now, &updateId)) {
+       TIME(&now);     
+       if (OK != computeIdAtTime(sb, 
+                                 now, 
+                                 &updateId)) {
          FREE(sb);
          return SYSERR;
        }

Modified: GNUnet/src/applications/fs/fsui/collection.c
===================================================================
--- GNUnet/src/applications/fs/fsui/collection.c        2005-07-17 10:42:29 UTC 
(rev 1570)
+++ GNUnet/src/applications/fs/fsui/collection.c        2005-07-17 12:24:55 UTC 
(rev 1571)
@@ -72,11 +72,11 @@
   /**
    * What is the update interval? (NBO!)
    */
-  cron_t updateInterval;
+  TIME_T updateInterval;
   /**
    * What is the update interval? (NBO!)
    */
-  cron_t lastPublication;
+  TIME_T lastPublication;
   /**
    * Anonymity level for the collection. (NBO)
    */
@@ -101,13 +101,13 @@
  */
 int FSUI_startCollection(struct FSUI_Context * ctx,
                         unsigned int anonymityLevel,
-                        cron_t updateInterval,
+                        TIME_T updateInterval,
                         const char * name,
                         const struct ECRS_MetaData * meta) {
   struct ECRS_URI * advertisement;
   struct ECRS_URI * rootURI;
   HashCode512 nextId;
-  cron_t now;
+  TIME_T now;
   unsigned int prio;
   CollectionData * cd;
   unsigned long long dirLen;
@@ -118,7 +118,7 @@
   GNUNET_ASSERT(name != NULL);
   advertisement = FSUI_parseCharKeywordURI(COLLECTION);
   GNUNET_ASSERT(advertisement != NULL);
-  cronTime(&now);
+  TIME(&now);
   prio = getConfigurationInt("FS",
                             "ADVERTISEMENT-PRIORITY");
   if (prio == 0)
@@ -210,7 +210,7 @@
  */
 void FSUI_publishCollectionNow(struct FSUI_Context * ctx) {
   CollectionData * cd;
-  cron_t now;
+  TIME_T now;
   struct ECRS_URI * uri;
   struct ECRS_URI * directoryURI;
   struct ECRS_MetaData *  metaData;
@@ -224,13 +224,13 @@
   if (ntohl(cd->changed) == NO)
     return;
 
-  cronTime(&now);
-  if ( (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
-       (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) &&
-       (ntohll(cd->lastPublication) + ntohll(cd->updateInterval) < now) )
+  TIME(&now);
+  if ( (ntohl(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
+       (ntohl(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) &&
+       (ntohl(cd->lastPublication) + ntohl(cd->updateInterval) < now) )
     return;
-  if ( (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
-       (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) ) {
+  if ( (ntohl(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
+       (ntohl(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) ) {
     HashCode512 delta;
 
     deltaId(&cd->nextId,
@@ -287,13 +287,13 @@
                                                "ADVERTISEMENT-PRIORITY"),
                            now + COLLECTION_ADV_LIFETIME,
                            now,
-                           ntohll(cd->updateInterval),
+                           ntohl(cd->updateInterval),
                            &cd->lastId,
                            &cd->nextId,
                            directoryURI,
                            metaData);
   if (uri != NULL) {
-    cd->lastPublication = htonll(now);
+    cd->lastPublication = htonl(now);
     cd->changed = htonl(NO);
     ECRS_freeUri(uri);
   }

Modified: GNUnet/src/applications/fs/fsui/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_info.c    2005-07-17 10:42:29 UTC 
(rev 1570)
+++ GNUnet/src/applications/fs/fsui/namespace_info.c    2005-07-17 12:24:55 UTC 
(rev 1571)
@@ -340,8 +340,8 @@
 }
 
 struct UpdateData {
-  cron_t updateInterval;
-  cron_t lastPubTime;
+  TIME_T updateInterval;
+  TIME_T lastPubTime;
   HashCode512 nextId;
   HashCode512 thisId;
 };
@@ -357,8 +357,8 @@
                          const HashCode512 * lastId,
                          HashCode512 * nextId,
                          ECRS_FileInfo * fi,
-                         cron_t * updateInterval,
-                         cron_t * lastPubTime) {
+                         TIME_T * updateInterval,
+                         TIME_T * lastPubTime) {
   char * fn;
   struct UpdateData * buf;
   char * uri;
@@ -420,8 +420,8 @@
     BREAK();
     return SYSERR;
   }
-  *updateInterval = ntohll(buf->updateInterval);
-  *lastPubTime = ntohll(buf->lastPubTime);
+  *updateInterval = ntohl(buf->updateInterval);
+  *lastPubTime = ntohl(buf->lastPubTime);
   *nextId = buf->nextId;
   FREE(buf);
   return OK;
@@ -434,8 +434,8 @@
                           const HashCode512 * thisId,
                           const HashCode512 * nextId,
                           const ECRS_FileInfo * fi,
-                          const cron_t updateInterval,
-                          const cron_t lastPubTime) {
+                          const TIME_T updateInterval,
+                          const TIME_T lastPubTime) {
   char * fn;
   char * uri;
   size_t metaSize;
@@ -448,8 +448,8 @@
   buf = MALLOC(size);
   buf->nextId = *nextId;
   buf->thisId = *thisId;
-  buf->updateInterval = htonll(updateInterval);
-  buf->lastPubTime = htonll(lastPubTime);
+  buf->updateInterval = htonl(updateInterval);
+  buf->lastPubTime = htonl(lastPubTime);
   memcpy(&buf[1],
         uri,
         strlen(uri)+1);
@@ -490,18 +490,18 @@
 FSUI_addToNamespace(struct FSUI_Context * ctx,
                    unsigned int anonymityLevel,
                    const char * name,
-                   cron_t updateInterval,
+                   TIME_T updateInterval,
                    const HashCode512 * lastId,
                    const HashCode512 * thisId,
                    const HashCode512 * nextId,
                    const struct ECRS_URI * dst,
                    const struct ECRS_MetaData * md) {
-  cron_t creationTime;
+  TIME_T creationTime;
   HashCode512 nid;
   HashCode512 tid;
-  cron_t now;
-  cron_t lastTime;
-  cron_t lastInterval;
+  TIME_T now;
+  TIME_T lastTime;
+  TIME_T lastInterval;
   ECRS_FileInfo fi;
   char * old;
   struct ECRS_URI * uri;
@@ -509,7 +509,7 @@
   /* computation of IDs of update(s).  Not as terrible as
      it looks, just enumerating all of the possible cases
      of periodic/sporadic updates and how IDs are computed. */
-  creationTime = cronTime(&now);
+  creationTime = TIME(&now);
   if (updateInterval != ECRS_SBLOCK_UPDATE_NONE) {
     if ( (lastId != NULL) &&
         (OK == readUpdateData(name,
@@ -632,10 +632,10 @@
   ECRS_FileInfo fi;
   HashCode512 lastId;
   HashCode512 nextId;
-  cron_t pubFreq;
-  cron_t lastTime;
-  cron_t nextTime;
-  cron_t now;
+  TIME_T pubFreq;
+  TIME_T lastTime;
+  TIME_T nextTime;
+  TIME_T now;
 
   if (OK != enc2hash(fil,
                     &lastId))
@@ -653,10 +653,11 @@
   if (pubFreq == ECRS_SBLOCK_UPDATE_SPORADIC) {
     nextTime = 0;
   } else {
-    cronTime(&now);
+    TIME(&now);
     nextTime = lastTime;
-    while (nextTime + pubFreq < now)
-      nextTime += pubFreq;
+    while ( (nextTime + pubFreq < now) &&
+           (nextTime + pubFreq > nextTime) ) 
+      nextTime += pubFreq;    
   }
   if (cls->it != NULL) {
     if (OK != cls->it(cls->closure,

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/applications/fs/module/fs.c      2005-07-17 12:24:55 UTC (rev 
1571)
@@ -943,17 +943,14 @@
 int initialize_module_fs(CoreAPIForApplication * capi) {
   static Blockstore dsGap;
   static Blockstore dsDht;
-  SBlock sb;
 
   GNUNET_ASSERT(sizeof(CHK) == 128);
   GNUNET_ASSERT(sizeof(DBlock) == 4);
   GNUNET_ASSERT(sizeof(IBlock) == 132);
-  GNUNET_ASSERT(sizeof(FileIdentifier) == 136);
   GNUNET_ASSERT(sizeof(KBlock) == 524);
-  GNUNET_ASSERT(sizeof(SBlock) == 732);
+  GNUNET_ASSERT(sizeof(SBlock) == 724);
   GNUNET_ASSERT(sizeof(NBlock) == 716);
   GNUNET_ASSERT(sizeof(KNBlock) == 1244);
-  sb.type = 0; /* make sb life */
 
   hash("GNUNET_FS",
        strlen("GNUNET_FS"),

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-07-17 10:42:29 UTC 
(rev 1570)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-07-17 12:24:55 UTC 
(rev 1571)
@@ -69,7 +69,7 @@
   char * tid;
   char * nid;
   struct ECRS_URI * nsuri;
-  unsigned int updateInterval;
+  TIME_T updateInterval;
   char * us;
 
   pname = getConfigurationString("GNUNET-INSERT",

Modified: GNUnet/src/include/ecrs_core.h
===================================================================
--- GNUnet/src/include/ecrs_core.h      2005-07-17 10:42:29 UTC (rev 1570)
+++ GNUnet/src/include/ecrs_core.h      2005-07-17 12:24:55 UTC (rev 1571)
@@ -103,8 +103,8 @@
    */
   HashCode512 identifier;
   /* from here on encrypted */
-  cron_t creationTime; /* in network byte order */
-  cron_t updateInterval; /* in network byte order */
+  TIME_T creationTime; /* in network byte order */
+  TIME_T updateInterval; /* in network byte order */
   HashCode512 nextIdentifier; /* N,  20 b */
   HashCode512 identifierIncrement; /* I, 20 b */
   /* 0-terminated URI follows here! */

Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h        2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/include/gnunet_ecrs_lib.h        2005-07-17 12:24:55 UTC (rev 
1571)
@@ -521,8 +521,8 @@
                    unsigned int anonymityLevel,
                    unsigned int priority,
                    cron_t expirationTime,
-                   cron_t creationTime,
-                   cron_t updateInterval,
+                   TIME_T creationTime,
+                   TIME_T updateInterval,
                    const HashCode512 * thisId,
                    const HashCode512 * nextId,
                    const struct ECRS_URI * dst,

Modified: GNUnet/src/include/gnunet_fsui_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fsui_lib.h        2005-07-17 10:42:29 UTC (rev 
1570)
+++ GNUnet/src/include/gnunet_fsui_lib.h        2005-07-17 12:24:55 UTC (rev 
1571)
@@ -356,8 +356,8 @@
                                   const ECRS_FileInfo * uri,
                                   const HashCode512 * lastId,
                                   const HashCode512 * nextId,
-                                  cron_t publicationFrequency,
-                                  cron_t nextPublicationTime);
+                                  TIME_T publicationFrequency,
+                                  TIME_T nextPublicationTime);
 
 /**
  * Iterator over active downloads.
@@ -602,7 +602,7 @@
  */
 int FSUI_startCollection(struct FSUI_Context * ctx,
                         unsigned int anonymityLevel,
-                        cron_t updateInterval,
+                        TIME_T updateInterval,
                         const char * name,
                         const struct ECRS_MetaData * meta); /* collection.c */
 
@@ -749,7 +749,7 @@
 FSUI_addToNamespace(struct FSUI_Context * ctx,
                    unsigned int anonymityLevel,
                    const char * name,
-                   cron_t updateInterval,
+                   TIME_T updateInterval,
                    const HashCode512 * lastId,
                    const HashCode512 * thisId,
                    const HashCode512 * nextId,

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2005-07-17 10:42:29 UTC (rev 1570)
+++ GNUnet/src/server/connection.c      2005-07-17 12:24:55 UTC (rev 1571)
@@ -1101,10 +1101,10 @@
 
   for (i=0;i<be->sendBufferSize;i++) {
     entry = be->sendBuffer[i];
-    tmpMsg = MALLOC(entry->len);
 
     if (entry->knapsackSolution == YES) {
       if (entry->callback != NULL) {
+       tmpMsg = MALLOC(entry->len);
        if (OK == entry->callback(tmpMsg,
                                  entry->closure,
                                  entry->len)) {

Modified: GNUnet/src/util/vector.c
===================================================================
--- GNUnet/src/util/vector.c    2005-07-17 10:42:29 UTC (rev 1570)
+++ GNUnet/src/util/vector.c    2005-07-17 12:24:55 UTC (rev 1571)
@@ -74,12 +74,11 @@
            (unsigned long long) vs->size,
            (unsigned long long) v->VECTOR_SEGMENT_SIZE,
            (unsigned long long) sum,
-           (unsigned long long) sum + vs->size - 1);
+           (unsigned long long) (sum + vs->size - 1));
     for (n=0;n<vs->size;n++) {
       fprintf(stderr,
-             "%p (%d), ",
-             vs->data[n],
-             (int) vs->data[n]);
+             "%p, ",
+             vs->data[n]);
     }
     fprintf(stderr, "\n");
     sum += vs->size;

Modified: gnunet-gtk/src/plugins/fs/collection.c
===================================================================
--- gnunet-gtk/src/plugins/fs/collection.c      2005-07-17 10:42:29 UTC (rev 
1570)
+++ gnunet-gtk/src/plugins/fs/collection.c      2005-07-17 12:24:55 UTC (rev 
1571)
@@ -53,7 +53,7 @@
   GtkWidget * spin;
   struct ECRS_MetaData * meta;
   struct ECRS_URI * root;
-  cron_t updateInterval;
+  TIME_T updateInterval;
 
   metaXML
     = glade_xml_new(getGladeFileName(),

Modified: gnunet-gtk/src/plugins/fs/helper.c
===================================================================
--- gnunet-gtk/src/plugins/fs/helper.c  2005-07-17 10:42:29 UTC (rev 1570)
+++ gnunet-gtk/src/plugins/fs/helper.c  2005-07-17 12:24:55 UTC (rev 1571)
@@ -35,7 +35,7 @@
  * @return OK on success, SYSERR on error
  */
 int parseTime(const char * t,
-             cron_t * param) {
+             TIME_T * param) {
   int pos;
   int start;
   unsigned int val;
@@ -88,7 +88,7 @@
     while ( t[pos] == ' ')
       pos++;
   }  
-  *param = ret;
+  *param = ret / cronSECONDS;
   return OK;
 }
 

Modified: gnunet-gtk/src/plugins/fs/helper.h
===================================================================
--- gnunet-gtk/src/plugins/fs/helper.h  2005-07-17 10:42:29 UTC (rev 1570)
+++ gnunet-gtk/src/plugins/fs/helper.h  2005-07-17 12:24:55 UTC (rev 1571)
@@ -35,6 +35,6 @@
  * @return OK on success, SYSERR on error
  */
 int parseTime(const char * t,
-             cron_t * val);
+             TIME_T * val);
 
 #endif

Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c       2005-07-17 10:42:29 UTC (rev 
1570)
+++ gnunet-gtk/src/plugins/fs/namespace.c       2005-07-17 12:24:55 UTC (rev 
1571)
@@ -251,8 +251,8 @@
                                      const ECRS_FileInfo * fi,
                                      const HashCode512 * lastId,
                                      const HashCode512 * nextId,
-                                     cron_t publicationFrequency,
-                                     cron_t nextPublicationTime) {
+                                     TIME_T publicationFrequency,
+                                     TIME_T nextPublicationTime) {
   GtkListStore * model = GTK_LIST_STORE(cls);
   GtkTreeIter iter;
   char * filename;
@@ -298,9 +298,9 @@
   uriString = ECRS_uriToString(fi->uri);
   hash2enc(lastId, &last);
   hash2enc(nextId, &next);
-  t = nextPublicationTime / cronSECONDS;
+  t = nextPublicationTime;
   date = GN_CTIME(&t);
-  freq = timeIntervalToFancyString(publicationFrequency);
+  freq = timeIntervalToFancyString(publicationFrequency * cronSECONDS);
   gtk_list_store_append(model,
                        &iter);
   gtk_list_store_set(model,
@@ -554,7 +554,7 @@
 typedef struct {
   unsigned int anonymityLevel;
   char * namespaceName;
-  cron_t updateInterval;
+  TIME_T updateInterval;
   HashCode512 * lastId;
   HashCode512 thisId;
   HashCode512 * nextId;  
@@ -619,8 +619,7 @@
                                 &cls->thisId,
                                 cls->nextId,
                                 cls->updateInterval,
-                                cls->updateInterval 
-                                + cronTime(NULL) );
+                                cls->updateInterval + TIME(NULL));
     }
     ECRS_freeUri(resultURI);
   } else {





reply via email to

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