gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r210 - in GNUnet: . contrib src/applications/dht/tools src/


From: grothoff
Subject: [GNUnet-SVN] r210 - in GNUnet: . contrib src/applications/dht/tools src/applications/fs/ecrs src/applications/fs/tools src/applications/gap src/applications/sqstore_mysql src/include
Date: Mon, 7 Feb 2005 15:33:04 -0800 (PST)

Author: grothoff
Date: 2005-02-07 15:33:03 -0800 (Mon, 07 Feb 2005)
New Revision: 210

Removed:
   GNUnet/src/applications/fs/ecrs/TODO
Modified:
   GNUnet/contrib/gnunet.user
   GNUnet/src/applications/dht/tools/dht-join.c
   GNUnet/src/applications/dht/tools/dht-query.c
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/tools/gnunet-download.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/applications/fs/tools/gnunet-search.c
   GNUnet/src/applications/gap/gap.c
   GNUnet/src/applications/sqstore_mysql/mysql.c
   GNUnet/src/include/gnunet_dht_service.h
   GNUnet/src/include/gnunet_gap_service.h
   GNUnet/todo
Log:
addressing MySQL iterator issue -- hopefully, needs testing

Modified: GNUnet/contrib/gnunet.user
===================================================================
--- GNUnet/contrib/gnunet.user  2005-02-07 22:40:30 UTC (rev 209)
+++ GNUnet/contrib/gnunet.user  2005-02-07 23:33:03 UTC (rev 210)
@@ -62,6 +62,18 @@
 # for pretty much anything. Use 0 for no timeout.
 SEARCHTIMEOUT   = 3000
 
+# Anonymity level for receiving data (default).
+ANONYMITY-RECEIVE = 1
+
+# Anonymity level for sharing data (default).
+ANONYMITY-SEND = 1
+
+# Default limit for the number of search results (0 for unlimited).
+MAXRESULTS = 0
+
+# Default timeout for searches
+SEARCHTIMEOUT = 300
+
 # Specify which additional extractor libraries should be used.
 # gnunet-insert uses libextractor to extract keywords from files.
 # libextractor can be dynamically extended to handle additional file

Modified: GNUnet/src/applications/dht/tools/dht-join.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-join.c        2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/dht/tools/dht-join.c        2005-02-07 23:33:03 UTC 
(rev 210)
@@ -25,7 +25,6 @@
  *
  * Todo:
  * - test
- * - add options (verbose reporting of DHT operations, leave-timeout)
  */
 
 #include "platform.h"

Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c       2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/dht/tools/dht-query.c       2005-02-07 23:33:03 UTC 
(rev 210)
@@ -103,7 +103,7 @@
   } /* while (1) */
   if (argc - GNoptind == 0) {
     LOG(LOG_WARNING, 
-       "No commands specified.\n");
+       _("No commands specified.\n"));
     printHelp();
     return SYSERR;
   }
@@ -243,14 +243,14 @@
   handle = getClientSocket();
   if (handle == NULL) {
     fprintf(stderr, 
-           _("failed to connect to gnunetd\n"));
+           _("Failed to connect to gnunetd.\n"));
     return 1;
   }
 
   for (i=0;i<count;i++) {
     if (0 == strcmp("get", commands[i])) {
       if (i+2 > count) 
-       errexit(_("command '%s' requires an argument ('%s')\n"),
+       errexit(_("Command '%s' requires an argument ('%s').\n"),
                "get",
                "key");
       do_get(handle, commands[++i]);
@@ -258,7 +258,7 @@
     }
     if (0 == strcmp("put", commands[i])) {
       if (i+3 > count) 
-       errexit(_("command '%s' requires two arguments ('%s' and '%s')\n"),
+       errexit(_("Command '%s' requires two arguments ('%s' and '%s').\n"),
                "put",
                "key",
                "value");
@@ -268,7 +268,7 @@
     }
     if (0 == strcmp("remove", commands[i])) {
       if (i+3 > count) 
-       errexit(_("command '%s' requires two arguments ('%s' and '%s')\n"),
+       errexit(_("Command '%s' requires two arguments ('%s' and '%s').\n"),
                "remove",
                "key",
                "value");

Deleted: GNUnet/src/applications/fs/ecrs/TODO
===================================================================
--- GNUnet/src/applications/fs/ecrs/TODO        2005-02-07 22:40:30 UTC (rev 
209)
+++ GNUnet/src/applications/fs/ecrs/TODO        2005-02-07 23:33:03 UTC (rev 
210)
@@ -1,12 +0,0 @@
-uri.c: DONE & tested
-meta.c: DONE & tested
-directory: DONE
-
-upload: DONE
-unindex: DONE, except code cleanup
-
-download: stats details, details in heuristics
-
-keyspace: DONE
-namespace: DONE
-search: DONE

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2005-02-07 22:40:30 UTC (rev 
209)
+++ GNUnet/src/applications/fs/ecrs/download.c  2005-02-07 23:33:03 UTC (rev 
210)
@@ -116,7 +116,7 @@
       fn[strlen(fn)-1]+=i;    
       if (0 != UNLINK(fn))
        LOG(LOG_WARNING,
-           " could not unlink temporary file %s: %s\n",
+           "Could not unlink temporary file %s: %s\n",
            fn, STRERROR(errno));
       FREE(fn);
     }

Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c  2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c  2005-02-07 23:33:03 UTC 
(rev 210)
@@ -236,6 +236,9 @@
   signalFinished = SEMAPHORE_NEW(0);
   ctx = FSUI_start(&progressModel,
                   &ok);
+  FSUI_setAnonymityLevel(ctx,
+                        getConfigurationInt("FS",
+                                            "ANONYMITY-SEND"));
   startCron();
   if (testConfigurationString("GNUNET-DOWNLOAD",
                              "RECURSIVE",

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-02-07 23:33:03 UTC 
(rev 210)
@@ -172,6 +172,8 @@
  */
 static void printhelp() {
   static Help help[] = {
+    { 'a', "anonymity", "LEVEL",
+      gettext_noop("set the desired LEVEL of sender-anonymity") },
     HELP_CONFIG,
     { 'C', "copy", NULL,
       gettext_noop("even if gnunetd is running on the local machine, force the"
@@ -237,6 +239,7 @@
     int option_index=0;
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
+      { "anonymity",     1, 0, 'a' }, 
       { "copy",          0, 0, 'C' },
       { "extract",       0, 0, 'e' },
       { "interval",      1, 0, 'i' },
@@ -257,7 +260,7 @@
     };    
     c = GNgetopt_long(argc,
                      argv, 
-                     "c:CdehH:i:L:k:K:m:nN:p:P:RSt:T:u:vV", 
+                     "a:c:CdehH:i:L:k:K:m:nN:p:P:RSt:T:u:vV", 
                      long_options, 
                      &option_index);    
     if (c == -1) 
@@ -265,6 +268,22 @@
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
+    case 'a': {
+      unsigned int receivePolicy;
+
+      if (1 != sscanf(GNoptarg,
+                     "%ud", 
+                     &receivePolicy)) {
+        LOG(LOG_FAILURE,
+         _("You must pass a number to the '%s' option.\n"),
+           "-a");
+        return -1;
+      }
+      setConfigurationInt("FS",
+                          "ANONYMITY-SEND",
+                          receivePolicy);
+      break;
+    }
     case 'C':
       FREENONNULL(setConfigurationString("FS",
                                         "DISABLE-SYMLINKING",
@@ -452,7 +471,7 @@
     EXTRACTOR_ExtractorList * l;
     char * ex;
 
-    ex = getConfigurationString("GNUNET-INSERT",
+    ex = getConfigurationString("FS",
                                "EXTRACTORS");
     if (ex == NULL)
       ex = STRDUP(EXTRACTOR_DEFAULT_LIBRARIES);
@@ -569,6 +588,9 @@
   /* fundamental init */
   ctx = FSUI_start((FSUI_EventCallback) &printstatus,
                   &verbose);
+  FSUI_setAnonymityLevel(ctx,
+                        getConfigurationInt("FS",
+                                            "ANONYMITY-SEND"));
   
   /* first insert all of the top-level files or directories */
   tmp = getConfigurationString("GNUNET-INSERT",
@@ -581,7 +603,7 @@
     doIndex = NO;
   else
     doIndex = YES;
-  extractors = getConfigurationString("GNUNET-INSERT",
+  extractors = getConfigurationString("FS",
                                      "EXTRACTORS");
   if (extractors == NULL)
       extractors = STRDUP(EXTRACTOR_DEFAULT_LIBRARIES);

Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c    2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c    2005-02-07 23:33:03 UTC 
(rev 210)
@@ -152,13 +152,15 @@
     case 'a': {
       unsigned int receivePolicy;
 
-      if (1 != sscanf(GNoptarg, "%ud", &receivePolicy)) {
+      if (1 != sscanf(GNoptarg,
+                     "%ud", 
+                     &receivePolicy)) {
         LOG(LOG_FAILURE,
          _("You must pass a number to the '%s' option.\n"),
            "-a");
         return -1;
       }
-      setConfigurationInt("AFS",
+      setConfigurationInt("FS",
                           "ANONYMITY-RECEIVE",
                           receivePolicy);
       break;
@@ -174,7 +176,7 @@
            "-m");
        return SYSERR;
       } else {
-       setConfigurationInt("AFS",
+       setConfigurationInt("FS",
                            "MAXRESULTS",
                            max);
        if (max == 0) 
@@ -195,7 +197,7 @@
            "-t");
        return SYSERR;
       } else {
-       setConfigurationInt("AFS",
+       setConfigurationInt("FS",
                            "SEARCHTIMEOUT",
                            timeout);
       }
@@ -245,7 +247,7 @@
   FREE(suri);
   
   memset(&max, 0, sizeof(SearchClosure));
-  max.max = getConfigurationInt("AFS",
+  max.max = getConfigurationInt("FS",
                                "MAXRESULTS");
   max.resultCount = 0;  
   if (max.max == 0)
@@ -258,8 +260,10 @@
     ECRS_freeUri(uri);
     return SYSERR;
   }
+  FSUI_setAnonymityLevel(ctx,
+                        getConfigurationInt("FS",
+                                            "ANONYMITY-RECEIVE"));
 
-
   FSUI_startSearch(ctx,
                   uri);  
   wait_for_shutdown();
@@ -345,7 +349,7 @@
   
   initializeShutdownHandlers();
   addCronJob((CronJob)&run_shutdown,
-            cronSECONDS * getConfigurationInt("AFS",
+            cronSECONDS * getConfigurationInt("FS",
                                               "SEARCHTIMEOUT"),
             0, /* no need to repeat */
             NULL);

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2005-02-07 22:40:30 UTC (rev 209)
+++ GNUnet/src/applications/gap/gap.c   2005-02-07 23:33:03 UTC (rev 210)
@@ -860,11 +860,11 @@
       ((PerNodeCallback)&hotpathSelectionCode,
        qr);    
     /* actual selection, proportional to rankings
-       assigned by newSelectCode ... */    
+       assigned by hotpathSelectionCode ... */    
     rankingSum = 0;
     for (i=0;i<8*BITMAP_SIZE;i++)
       rankingSum += qr->rankings[i];
-    if ( (rankingSum != 0) && /* doppelt haelt besser */
+    if ( (rankingSum != 0) && 
         (qr->activeConnections > 0) ) {
       /* select 4 peers for forwarding */
       for (i=0;i<4;i++) {

Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c       2005-02-07 22:40:30 UTC 
(rev 209)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c       2005-02-07 23:33:03 UTC 
(rev 210)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2004 Christian Grothoff (and other contributing 
authors)
+     (C) 2001, 2002, 2003, 2004, 2005 Christian Grothoff (and other 
contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -150,14 +150,14 @@
  * a failure of the command 'cmd' with the message given
  * by strerror(errno).
  */
-#define DIE_MYSQL(cmd, dbh) do { errexit(_("'%s' failed at %s:%d with error: 
%s\n"), cmd, __FILE__, __LINE__, mysql_error(dbh->dbf)); } while(0);
+#define DIE_MYSQL(cmd, dbh) do { errexit(_("'%s' failed at %s:%d with error: 
%s\n"), cmd, __FILE__, __LINE__, mysql_error((dbh)->dbf)); } while(0);
 
 /**
  * Log an error message at log-level 'level' that indicates
  * a failure of the command 'cmd' on file 'filename'
  * with the message given by strerror(errno).
  */
-#define LOG_MYSQL(level, cmd, dbh) do { LOG(level, _("'%s' failed at %s:%d 
with error: %s\n"), cmd, __FILE__, __LINE__, mysql_error(dbh->dbf)); } while(0);
+#define LOG_MYSQL(level, cmd, dbh) do { LOG(level, _("'%s' failed at %s:%d 
with error: %s\n"), cmd, __FILE__, __LINE__, mysql_error((dbh)->dbf)); } 
while(0);
 
 
 
@@ -171,6 +171,7 @@
   int avgLength_ID;       /* which column contains the Avg_row_length  
                             * in SHOW TABLE STATUS resultset */
   int useDelayed;          /* use potentially unsafe delayed inserts? */
+  char * cnffile;  
 } mysqlHandle;
 
 static mysqlHandle * dbh;
@@ -206,8 +207,56 @@
   return(datum);
 }
 
+/**
+ * Initiate the database connection.  
+ * Uses dbhI->cnffile for the configuration,
+ * so that must be set already.
+ * @return OK on success
+ */
+static int iopen(mysqlHandle * dbhI) {
+  if (dbhI->cnffile == NULL)
+    return SYSERR;
+  dbhI->dbf = mysql_init(NULL);
+  if (dbhI->dbf == NULL)
+    return SYSERR;  
+  mysql_options(dbhI->dbf,
+               MYSQL_READ_DEFAULT_FILE,
+               dbh->cnffile);
+  mysql_options(dbhI->dbf, 
+               MYSQL_READ_DEFAULT_GROUP, 
+               "client");
+  mysql_real_connect(dbhI->dbf,
+                    NULL,
+                    NULL,
+                    NULL,
+                    "gnunet",
+                    0,
+                    NULL,
+                    0);
+  if (mysql_error(dbhI->dbf)[0]) {
+    LOG_MYSQL(LOG_ERROR, 
+             "mysql_real_connect",
+             dbhI);
+    dbhI->dbf = NULL;
+    return SYSERR;
+  }    
+  MUTEX_CREATE_RECURSIVE(&dbhI->DATABASE_Lock_);
+  return OK;
+}
 
 /**
+ * Close the database connection.
+ */
+static int iclose(mysqlHandle * dbhI) {
+  if (dbh->dbf == NULL)
+    return SYSERR;
+  MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+  mysql_close(dbh->dbf);
+  dbh->dbf = NULL;
+  return OK;
+}
+
+/**
  * Iterate over the items in the datastore in ascending
  * order of priority.
  *
@@ -226,9 +275,14 @@
   char * scratch;
   char typestr[32];
   int count = 0;
+  mysqlHandle dbhI;
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_);
+  dbhI.cnffile = dbh->cnffile; /* shared */
+  if (OK != iopen(&dbhI))
+    return SYSERR;
 
+  MUTEX_LOCK(&dbhI.DATABASE_Lock_);
+
   if(type==0) {
     typestr[0]=0;
   } else {
@@ -244,17 +298,17 @@
           " %s"
           " ORDER BY prio ASC",
           typestr);
-  mysql_query(dbh->dbf, 
+  mysql_query(dbhI.dbf, 
              scratch);
   FREE(scratch);
-  if (mysql_error(dbh->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, "mysql_query", dbh);
-    MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  if (mysql_error(dbhI.dbf)[0]) {
+    LOG_MYSQL(LOG_ERROR, "mysql_query", &dbhI);
+    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     return(SYSERR);
   }
   
-  if (!(sql_res=mysql_use_result(dbh->dbf))) {
-    MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  if (!(sql_res=mysql_use_result(dbhI.dbf))) {
+    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     return(SYSERR);
   }
 
@@ -272,10 +326,14 @@
   }
                
   mysql_free_result(sql_res);
-  MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
+  iclose(&dbhI);
   return count;
 }
 
+  
+
+
 /**
  * Iterate over the items in the datastore in ascending
  * order of expiration time.
@@ -294,10 +352,16 @@
   Datastore_Datum * datum;
   char * scratch;
   char typestr[32];
-  int count = 0;
+  int count = 0;   
+  mysqlHandle dbhI;
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_);
+  dbhI.cnffile = dbh->cnffile; /* shared */
+  if (OK != iopen(&dbhI))
+    return SYSERR;
 
+
+  MUTEX_LOCK(&dbhI.DATABASE_Lock_);
+
   if(type==0) {
     typestr[0]=0;
   } else {
@@ -313,17 +377,17 @@
           " %s"
           " ORDER BY expire ASC",
           typestr);
-  mysql_query(dbh->dbf, 
+  mysql_query(dbhI.dbf, 
              scratch);
   FREE(scratch);
-  if (mysql_error(dbh->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, "mysql_query", dbh);
-    MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  if (mysql_error(dbhI.dbf)[0]) {
+    LOG_MYSQL(LOG_ERROR, "mysql_query", &dbhI);
+    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     return(SYSERR);
   }
   
-  if (!(sql_res=mysql_use_result(dbh->dbf))) {
-    MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  if (!(sql_res=mysql_use_result(dbhI.dbf))) {
+    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     return(SYSERR);
   }
 
@@ -340,7 +404,8 @@
   }
                
   mysql_free_result(sql_res);
-  MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
+  MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
+  iclose(&dbhI);
   return count;
 }
 
@@ -764,43 +829,20 @@
   }
 
   dbh = MALLOC(sizeof(mysqlHandle));
-  dbh->dbf = mysql_init(NULL);
-  if(dbh->dbf == NULL) {
-    LOG(LOG_ERROR, 
-       _("Unable to initialize MySQL.\n"));
-    FREE(dbh);
-    return NULL;
-  }
-  if(testConfigurationString("AFS",
-                            "MYSQL_DELAYED",
-                            "YES"))
+  dbh->cnffile = cnffile;
+  if (testConfigurationString("AFS",
+                             "MYSQL_DELAYED",
+                             "YES"))
     dbh->useDelayed = YES;
   else
     dbh->useDelayed = NO;
 
-  mysql_options(dbh->dbf,
-               MYSQL_READ_DEFAULT_FILE,
-               cnffile);
-  mysql_options(dbh->dbf, 
-               MYSQL_READ_DEFAULT_GROUP, 
-               "client");
-  mysql_real_connect(dbh->dbf,
-                    NULL,
-                    NULL,
-                    NULL,
-                    "gnunet",
-                    0,
-                    NULL,
-                    0);
-  if (mysql_error(dbh->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, 
-             "mysql_real_connect",
-             dbh);
+  if (OK != iopen(dbh)) {
+    FREE(cnffile);
     FREE(dbh);
-    FREE(cnffile);
+    dbh = NULL;
     return NULL;
-  }    
-  FREE(cnffile);
+  }
 
   scratch = MALLOC(1024);
   SNPRINTF(scratch,
@@ -823,12 +865,14 @@
     LOG_MYSQL(LOG_ERROR, 
              "mysql_query",
              dbh);
+    iclose(dbh);
     FREE(dbh);
+    FREE(cnffile);
     FREE(scratch);
     return NULL;
   }
-  MUTEX_CREATE_RECURSIVE(&dbh->DATABASE_Lock_);        
 
+
   /* Find out which column contains the avg row length field and assume
    * that mysqld always gives it in the same order across calls :) */
   SNPRINTF(scratch, 
@@ -841,8 +885,9 @@
     LOG_MYSQL(LOG_ERROR, 
              "mysql_query",
              dbh);
-    MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+    iclose(dbh);
     FREE(dbh);
+    FREE(cnffile);
     return NULL;
   }
   if((sql_res=mysql_store_result(dbh->dbf))) {
@@ -854,15 +899,17 @@
     num_fields=mysql_num_fields(sql_res);
     if(num_fields<=0) {
       LOG(LOG_ERROR, "ERROR: num_fields<=0\n");
-      MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+      iclose(dbh);
       FREE(dbh);
+      FREE(cnffile);
       return NULL;
     }
     sql_fields=mysql_fetch_fields(sql_res); 
     if(sql_fields==NULL) {
       LOG(LOG_ERROR, "ERROR: sql_fields==0\n");
-      MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+      iclose(dbh);
       FREE(dbh);
+      FREE(cnffile);
       return NULL;
     }
     dbh->avgLength_ID = -1;
@@ -878,16 +925,18 @@
     if (found == NO) {
       BREAK();
       /* avg_row_length not found in SHOW TABLE STATUS */
-      MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+      iclose(dbh);
       FREE(dbh);
+      FREE(cnffile);
       return NULL;
     }
     /* FIXME: mysql manual doesn't mention if sql_fields should be freed?*/
   } else {
     LOG(LOG_ERROR, "ERROR: couldn't store res row for SHOW TABLE STATUS\n");
     BREAK();
-    MUTEX_DESTROY(&dbh->DATABASE_Lock_);
+    iclose(dbh);
     FREE(dbh);
+    FREE(cnffile);
     return NULL;
   }
 
@@ -906,8 +955,8 @@
  * Shutdown the module.
  */
 void release_module_sqstore_mysql() {
-  MUTEX_DESTROY(&dbh->DATABASE_Lock_);
-  mysql_close(dbh->dbf);
+  iclose(dbh);
+  FREE(dbh->cnffile);
   FREE(dbh);
   dbh = NULL;
 }

Modified: GNUnet/src/include/gnunet_dht_service.h
===================================================================
--- GNUnet/src/include/gnunet_dht_service.h     2005-02-07 22:40:30 UTC (rev 
209)
+++ GNUnet/src/include/gnunet_dht_service.h     2005-02-07 23:33:03 UTC (rev 
210)
@@ -42,7 +42,7 @@
 struct DHT_REMOVE_RECORD;
 
 /**
- * DHT operation 'complete' (i.e timed out)
+ * DHT operation 'complete' (i.e timed out).
  */
 typedef void (*DHT_OP_Complete)(void * closure);
 

Modified: GNUnet/src/include/gnunet_gap_service.h
===================================================================
--- GNUnet/src/include/gnunet_gap_service.h     2005-02-07 22:40:30 UTC (rev 
209)
+++ GNUnet/src/include/gnunet_gap_service.h     2005-02-07 23:33:03 UTC (rev 
210)
@@ -20,10 +20,9 @@
 /**
  * @file include/gnunet_gap_service.h
  * @brief API to the GAP-module.  This API is what will be used by
- *     GAP clients that run as modules within gnunetd.  If you
- *     are writing a client look at either gnunet_gap.h (if you
- *     want to handle the communication with gnunetd yourself) or
- *     at gnunet_gap_lib to use the convenience library.
+ *     GAP clients that run as modules within gnunetd.  GAP is
+ *     currently not supposed to be used directly by clients,
+ *     look at the gnunet_fs_lib.h for the lowest-level client API.
  * @author Christian Grothoff
  */
 

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2005-02-07 22:40:30 UTC (rev 209)
+++ GNUnet/todo 2005-02-07 23:33:03 UTC (rev 210)
@@ -8,8 +8,6 @@
 - 593???
 
 0.7.0pre0 [3'05] (aka "pre-preview"):
-- Missing Features:
-  * mysql sqstore implementation iterator problem (Igor?)
 - Need testing:
   * ECRS-directories (build, iterate)
   * FS/ECRS upload/download
@@ -19,19 +17,18 @@
 
 0.7.0pre1 [4'05] (aka "preview"):
 - topology: do aggressive bootstrap on first start (Christian) [ easy ]
-- ecrs-unindex: code cleanup [ easy ]
 - sqlite sqstore implementation does not compile yet (Nils)
 - gnunet-search: 
   * dump directory with search results [ easy ]
-  * 'handle' anonymity-level setting [ easy ]
 - gap:
-  * economy for local queries not available (see applications/gap/TODO) [ 
tricky ]
+  * economy for local queries (see applications/gap/TODO) [ tricky ]
 - FSUI:
   * download: various details wrt generated events
   * namespace updates
   * collections
 
 0.7.0 [5'05] (aka "compatibility? what's that?"):
+- ecrs-unindex: code cleanup [ easy ]
 - Missing Features:
   * configure.ac: flags for mysql, gmp, libgcrypt should ONLY be passed when
     linking the respective modules / libraries (gnunet_util, sqstore_mysql) [ 
tricky ]





reply via email to

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