gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2406 - GNUnet/src/applications/fs/fsui


From: grothoff
Subject: [GNUnet-SVN] r2406 - GNUnet/src/applications/fs/fsui
Date: Fri, 23 Dec 2005 16:37:15 -0800 (PST)

Author: grothoff
Date: 2005-12-23 16:37:14 -0800 (Fri, 23 Dec 2005)
New Revision: 2406

Modified:
   GNUnet/src/applications/fs/fsui/namespace_info.c
   GNUnet/src/applications/fs/fsui/namespace_infotest.c
Log:
stupid loop

Modified: GNUnet/src/applications/fs/fsui/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_info.c    2005-12-24 00:31:27 UTC 
(rev 2405)
+++ GNUnet/src/applications/fs/fsui/namespace_info.c    2005-12-24 00:37:14 UTC 
(rev 2406)
@@ -717,9 +717,9 @@
   } else {
     TIME(&now);
     nextTime = lastTime;
-    while ( (nextTime + pubFreq < now) &&
+    if ( (nextTime + pubFreq < now) &&
            (nextTime + pubFreq > nextTime) )
-      nextTime += pubFreq;
+      nextTime += pubFreq * ((now - nextTime) / pubFreq);  
   }
   if (cls->it != NULL) {
     if (OK != cls->it(cls->closure,

Modified: GNUnet/src/applications/fs/fsui/namespace_infotest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_infotest.c        2005-12-24 
00:31:27 UTC (rev 2405)
+++ GNUnet/src/applications/fs/fsui/namespace_infotest.c        2005-12-24 
00:37:14 UTC (rev 2406)
@@ -65,6 +65,7 @@
   struct ECRS_MetaData * meta = NULL;
   HashCode512 root;
   int old;
+  int newVal;
   struct FSUI_Context * ctx;
 
   if (OK != initUtil(argc,
@@ -110,6 +111,7 @@
                                  "test",
                                  NULL,
                                  NULL);
+  printf("%d\n", old);
   euri = FSUI_addToNamespace(ctx,
                             1,
                             "test",
@@ -120,10 +122,12 @@
                             uri,
                             meta);
   CHECK(euri != NULL);
-  CHECK(old + 1 == FSUI_listNamespaceContent(ctx,
-                                            "test",
-                                            NULL,
-                                            NULL));
+  newVal = FSUI_listNamespaceContent(ctx,
+                                    "test",
+                                    NULL,
+                                    NULL);
+  printf("%d\n", newVal);
+  CHECK(old + 1 == newVal);
   CHECK(OK == ECRS_deleteNamespace("test"));
   /* END OF TEST CODE */
  FAILURE:





reply via email to

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