gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r251 - in GNUnet: . src/applications src/applications/datas


From: grothoff
Subject: [GNUnet-SVN] r251 - in GNUnet: . src/applications src/applications/datastore src/applications/fs/module src/applications/gap src/applications/sqstore_mysql src/include
Date: Sat, 12 Feb 2005 20:53:34 -0800 (PST)

Author: grothoff
Date: 2005-02-12 20:53:33 -0800 (Sat, 12 Feb 2005)
New Revision: 251

Modified:
   GNUnet/configure.ac
   GNUnet/src/applications/Makefile.am
   GNUnet/src/applications/datastore/datastore.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/applications/gap/gap.c
   GNUnet/src/applications/sqstore_mysql/mysql.c
   GNUnet/src/include/gnunet_protocols.h
   GNUnet/todo
Log:
more bugfixes


Modified: GNUnet/configure.ac
===================================================================
--- GNUnet/configure.ac 2005-02-12 23:17:17 UTC (rev 250)
+++ GNUnet/configure.ac 2005-02-13 04:53:33 UTC (rev 251)
@@ -322,7 +322,7 @@
   AC_MSG_CHECKING(mysql version)
   AC_RUN_IFELSE([AC_LANG_PROGRAM(
     [[#include <mysql/mysql.h>]],
-    [[if (MYSQL_VERSION_ID < 32356)
+    [[if (MYSQL_VERSION_ID < 40100)
         return(-1);
       else
         return(0);
@@ -331,7 +331,7 @@
   if test "$mysql" = "false"
   then
     mysqlfail=true
-    AC_MSG_RESULT([fail, >= 3.23.56 required])
+    AC_MSG_RESULT([fail, >= 4.1 required])
   else
     AC_MSG_RESULT(ok)
   fi

Modified: GNUnet/src/applications/Makefile.am
===================================================================
--- GNUnet/src/applications/Makefile.am 2005-02-12 23:17:17 UTC (rev 250)
+++ GNUnet/src/applications/Makefile.am 2005-02-13 04:53:33 UTC (rev 251)
@@ -1,9 +1,9 @@
 if HAVE_MYSQL
-       MYSQL_DIR = sqstore_mysql
+ MYSQL_DIR = sqstore_mysql
 endif
 
 if !MINGW
-       TESTBED_DIR = testbed
+ TESTBED_DIR = testbed
 endif
 
 SUBDIRS        = \

Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c       2005-02-12 23:17:17 UTC 
(rev 250)
+++ GNUnet/src/applications/datastore/datastore.c       2005-02-13 04:53:33 UTC 
(rev 251)
@@ -71,10 +71,15 @@
               Datum_Iterator iter,
               void * closure) {
   int ret;
+  EncName enc;
 
   if (! testAvailable(query)) {
+    IFLOG(LOG_DEBUG,
+         hash2enc(query,
+                  &enc));
     LOG(LOG_DEBUG,
-       "Datastore availability pre-test failed for request.\n");
+       "Datastore availability pre-test failed for %s.\n",
+       &enc);
     return 0;
   }
 

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2005-02-12 23:17:17 UTC (rev 
250)
+++ GNUnet/src/applications/fs/module/fs.c      2005-02-13 04:53:33 UTC (rev 
251)
@@ -161,9 +161,14 @@
 static int get_result_callback(const HashCode160 * key,
                               const DataContainer * value,
                               DHT_GET_CLS * cls) {
+  EncName enc;
+
+  IFLOG(LOG_DEBUG,
+       hash2enc(key, 
+                &enc));
   LOG(LOG_DEBUG,
-      "Found reply to query %u.\n",
-      key->a);
+      "Found reply to query %s.\n",
+      &enc);
   gapPut(NULL,
         key,
         value,
@@ -651,6 +656,7 @@
                              ggc->resCallbackClosure);
   else
     ret = OK;
+  ggc->count++;
   FREE(gw);
   FREENONNULL(xvalue);
   return ret;
@@ -673,15 +679,31 @@
                  void * resCallbackClosure) {
   int ret;
   GGC myClosure;
+  EncName enc;
 
+  IFLOG(LOG_DEBUG,
+       hash2enc(&keys[0],
+                &enc));
+  LOG(LOG_DEBUG,
+      "GAP requests content for %s of type %u\n",
+      &enc,
+      type);
+  myClosure.count = 0;
   myClosure.keyCount = keyCount;
   myClosure.keys = keys;
   myClosure.resultCallback = resultCallback;
   myClosure.resCallbackClosure = resCallbackClosure;
-  ret = datastore->get(&keys[0],
-                      type,
-                      &gapGetConverter,
-                      &myClosure);
+  if (type == D_BLOCK) {
+    ret = datastore->get(&keys[0],
+                        ONDEMAND_BLOCK,
+                        &gapGetConverter,
+                        &myClosure);
+  }
+  if (ret == OK) 
+    ret = datastore->get(&keys[0],
+                        type,
+                        &gapGetConverter,
+                        &myClosure);
   if (ret != SYSERR)
     ret = myClosure.count; /* return number of actual
                              results (unfiltered) that
@@ -816,7 +838,15 @@
                  void * resCallbackClosure) {
   int ret;
   GGC myClosure;
+  EncName enc;
 
+  IFLOG(LOG_DEBUG,
+       hash2enc(&keys[0],
+                &enc));
+  LOG(LOG_DEBUG,
+      "DHT requests content for %s of type %u\n",
+      &enc,
+      type);
   myClosure.keyCount = keyCount;
   myClosure.keys = keys;
   myClosure.resultCallback = resultCallback;

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2005-02-12 23:17:17 UTC (rev 250)
+++ GNUnet/src/applications/gap/gap.c   2005-02-13 04:53:33 UTC (rev 251)
@@ -1420,13 +1420,6 @@
   int doForward;
   EncName enc;
   
-  IFLOG(LOG_DEBUG,
-        hash2enc(&query->queries[0],
-                &enc));
-  LOG(LOG_DEBUG,
-      "Executing request %s.\n",
-      &enc);
-
   ite = &ROUTING_indTable_[computeRoutingIndex(&query->queries[0])];
   MUTEX_LOCK(&ite->lookup_exclusion); 
   if (sender != NULL) {
@@ -1448,6 +1441,17 @@
   if ( (policy & QUERY_FORWARD) == 0)
     doForward = NO;
 
+  IFLOG(LOG_DEBUG,
+        hash2enc(&query->queries[0],
+                &enc));
+  LOG(LOG_DEBUG,
+      "GAP is executing request for %s: %s %s\n",
+      &enc,
+      doForward ? "forwarding" : "",
+      isRouted ? "routing" : "");
+
+
+
   cls.values = NULL;
   cls.valueCount = 0;
   cls.sender = sender;

Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c       2005-02-12 23:17:17 UTC 
(rev 250)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c       2005-02-13 04:53:33 UTC 
(rev 251)
@@ -274,16 +274,16 @@
 
   mysql_query(dbhI->dbf,
              "CREATE TABLE IF NOT EXISTS gn070 ("
-             "  size INT(11) UNSIGNED NOT NULL DEFAULT 0,"
-             "  type INT(11) UNSIGNED NOT NULL DEFAULT 0,"
-             "  prio INT(11) UNSIGNED NOT NULL DEFAULT 0,"
-             "  anonLevel INT(11) UNSIGNED NOT NULL DEFAULT 0,"
-             "  expire BIGINT UNSIGNED NOT NULL DEFAULT 0," 
-             "  hash TINYBLOB BINARY NOT NULL DEFAULT '',"
-             "  value BLOB NOT NULL DEFAULT '',"
-             "  INDEX (hash(20)),"
-             "  INDEX (prio),"
-             "  INDEX (expire)"
+             " size INT(11) NOT NULL DEFAULT 0,"
+             " type INT(11) NOT NULL DEFAULT 0,"
+             " prio INT(11) NOT NULL DEFAULT 0,"
+             " anonLevel INT(11) NOT NULL DEFAULT 0,"
+             " expire BIGINT NOT NULL DEFAULT 0," 
+             " hash TINYBLOB BINARY NOT NULL DEFAULT '',"
+             " value BLOB NOT NULL DEFAULT '',"
+             " INDEX (hash(20)),"
+             " INDEX (prio),"
+             " INDEX (expire)"
              ") TYPE=MyISAM");
   if (mysql_error(dbhI->dbf)[0]) {
     LOG_MYSQL(LOG_ERROR, 
@@ -687,10 +687,18 @@
   Datastore_Value * datum;
   HashCode160 key;
   unsigned long hashSize;
+  EncName enc;
 
   if (query == NULL) 
     return iterateLowPriority(type, iter, closure);
 
+  IFLOG(LOG_DEBUG,
+       hash2enc(query,
+                &enc));
+  LOG(LOG_DEBUG,
+      "MySQL looks for %s of type %u\n",
+      &enc,
+      type);
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
   if (type != 0) {
     if (iter == NULL)
@@ -827,6 +835,14 @@
   FREE(datum);
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
   
+  IFLOG(LOG_DEBUG,
+       hash2enc(query,
+                &enc));
+  LOG(LOG_DEBUG,
+      "MySQL found %u results for %s of type %u\n",
+      count,
+      &enc,
+      type);
   return count;
 }
 
@@ -881,20 +897,20 @@
   if (mysql_stmt_bind_param(dbh->insert,
                            dbh->bind)) {
     LOG(LOG_ERROR,
-               _("'%s' failed at %s:%d with error: %s\n"),
-               "mysql_stmt_bind_param",
-               __FILE__, __LINE__,
-               mysql_stmt_error(dbh->insert));    
+       _("'%s' failed at %s:%d with error: %s\n"),
+       "mysql_stmt_bind_param",
+       __FILE__, __LINE__,
+       mysql_stmt_error(dbh->insert));    
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
   } 
 
   if (mysql_stmt_execute(dbh->insert)) {
     LOG(LOG_ERROR,
-               _("'%s' failed at %s:%d with error: %s\n"),
-               "mysql_stmt_execute",
-               __FILE__, __LINE__,
-               mysql_stmt_error(dbh->insert));    
+       _("'%s' failed at %s:%d with error: %s\n"),
+       "mysql_stmt_execute",
+       __FILE__, __LINE__,
+       mysql_stmt_error(dbh->insert));    
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
   }  

Modified: GNUnet/src/include/gnunet_protocols.h
===================================================================
--- GNUnet/src/include/gnunet_protocols.h       2005-02-12 23:17:17 UTC (rev 
250)
+++ GNUnet/src/include/gnunet_protocols.h       2005-02-13 04:53:33 UTC (rev 
251)
@@ -395,4 +395,5 @@
  */
 #define ONDEMAND_BLOCK 0xFFFFFFFF
 
+
 #endif

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2005-02-12 23:17:17 UTC (rev 250)
+++ GNUnet/todo 2005-02-13 04:53:33 UTC (rev 251)
@@ -8,6 +8,8 @@
 - 593???
 
 0.7.0pre0 [3'05] (aka "pre-preview"):
+- padding for insert/return requests: we're currently breaking
+  8-byte alignment!
 - Investigate KBlocks:
   generated public keys are fishy 
   (far to many 0-values in N!)





reply via email to

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