gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3719 - in GNUnet/src/applications: fs/ecrs fs/module gap g


From: grothoff
Subject: [GNUnet-SVN] r3719 - in GNUnet/src/applications: fs/ecrs fs/module gap getoption identity topology_default
Date: Sun, 12 Nov 2006 00:28:45 -0800 (PST)

Author: grothoff
Date: 2006-11-12 00:28:39 -0800 (Sun, 12 Nov 2006)
New Revision: 3719

Modified:
   GNUnet/src/applications/fs/ecrs/meta.c
   GNUnet/src/applications/fs/module/ondemand.c
   GNUnet/src/applications/gap/gap.c
   GNUnet/src/applications/getoption/getoption.c
   GNUnet/src/applications/identity/hostkey.c
   GNUnet/src/applications/topology_default/topology.c
Log:
fixes

Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c      2006-11-12 08:23:21 UTC (rev 
3718)
+++ GNUnet/src/applications/fs/ecrs/meta.c      2006-11-12 08:28:39 UTC (rev 
3719)
@@ -29,6 +29,8 @@
 #include "gnunet_ecrs_lib.h"
 #include <zlib.h>
 
+#define EXTRA_CHECKS ALLOW_EXTRA_CHECKS
+
 /**
  * Create a fresh MetaData token.
  */

Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c        2006-11-12 08:23:21 UTC 
(rev 3718)
+++ GNUnet/src/applications/fs/module/ondemand.c        2006-11-12 08:28:39 UTC 
(rev 3719)
@@ -34,6 +34,7 @@
 #define DEBUG_ONDEMAND NO
 
 #define TRACK_INDEXED_FILES NO
+
 #define TRACKFILE "indexed_requests.txt"
 
 /**

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2006-11-12 08:23:21 UTC (rev 3718)
+++ GNUnet/src/applications/gap/gap.c   2006-11-12 08:28:39 UTC (rev 3719)
@@ -785,12 +785,14 @@
 #if DEBUG_GAP
   EncName enc;
 
-  IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       hash2enc(primaryKey,
-                &enc));
-  GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-      "Gap queues reply to query `%s' for later use.\n",
-      &enc);
+  IF_GELOG(ectx, 
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          hash2enc(primaryKey,
+                   &enc));
+  GE_LOG(ectx, 
+        GE_DEBUG | GE_REQUEST | GE_USER,
+        "Gap queues reply to query `%s' for later use.\n",
+        &enc);
 #endif
 
 #if EXTRA_CHECKS
@@ -805,15 +807,17 @@
   if (! equalsHashCode512(&ite->primaryKey,
                          primaryKey) ) {
 #if DEBUG_GAP
-    GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       "GAP: Dropping reply, routing table has no query associated with it 
(anymore)\n");
+    GE_LOG(ectx, 
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          "GAP: Dropping reply, routing table has no query associated with it 
(anymore)\n");
 #endif
     return NO; /* we don't care for the reply (anymore) */
   }
   if (YES == ite->successful_local_lookup_in_delay_loop) {
 #if DEBUG_GAP
-    GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       "GAP: Dropping reply, found reply locally during delay\n");
+    GE_LOG(ectx,
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          "GAP: Dropping reply, found reply locally during delay\n");
 #endif
     return NO; /* wow, really bad concurrent DB lookup and processing for
                  the same query.  Well, at least we should not also
@@ -906,13 +910,15 @@
 #if DEBUG__GAP
   EncName enc;
 
-  IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       hash2enc(query,
-                &enc));
-  GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-      "GAP: Queueing query '%s' in slot %p\n",
-      &enc,
-      ite);
+  IF_GELOG(ectx,
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          hash2enc(query,
+                   &enc));
+  GE_LOG(ectx, 
+        GE_DEBUG | GE_REQUEST | GE_USER,
+        "GAP: Queueing query '%s' in slot %p\n",
+        &enc,
+        ite);
 #endif
   GE_ASSERT(ectx, sender != 0); /* do NOT add to RT for local clients! */
   now = get_time();
@@ -1454,15 +1460,17 @@
     doForward = NO;
 
 #if DEBUG_GAP
-  IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-        hash2enc(&query->queries[0],
-                &enc));
-  GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-      "GAP is executing request for `%s':%s%s (%d)\n",
-      &enc,
-      doForward ? " forwarding" : "",
-      isRouted ? " routing" : "",
-      i);
+  IF_GELOG(ectx,
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          hash2enc(&query->queries[0],
+                   &enc));
+  GE_LOG(ectx,
+        GE_DEBUG | GE_REQUEST | GE_USER,
+        "GAP is executing request for `%s':%s%s (%d)\n",
+        &enc,
+        doForward ? " forwarding" : "",
+        isRouted ? " routing" : "",
+        i);
 #endif
   if ( (stats != NULL) &&
        (isRouted || doForward) )
@@ -1805,8 +1813,9 @@
 
     anonymityLevel--;
     if (traffic == NULL) {
-      GE_LOG(ectx, GE_ERROR | GE_BULK | GE_USER,
-         _("Cover traffic requested but traffic service not loaded.  Rejecting 
request.\n"));
+      GE_LOG(ectx,
+            GE_ERROR | GE_BULK | GE_USER,
+            _("Cover traffic requested but traffic service not loaded.  
Rejecting request.\n"));
       return SYSERR;
     }
     if (OK != traffic->get((TTL_DECREMENT + timeout) / TRAFFIC_TIME_UNIT,
@@ -1816,25 +1825,29 @@
                           &peers,
                           &sizes,
                           &timevect)) {
-      GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
-         _("Failed to get traffic stats.\n"));
+      GE_LOG(ectx, 
+            GE_WARNING | GE_BULK | GE_USER,
+            _("Failed to get traffic stats.\n"));
       return SYSERR;
     }
     if (anonymityLevel > 1000) {
       if (peers < anonymityLevel / 1000) {
-       GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
-           _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
+       GE_LOG(ectx, 
+              GE_WARNING | GE_BULK | GE_USER,
+              _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
        return SYSERR;
       }
       if (count < anonymityLevel % 1000) {
-       GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
-           _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
+       GE_LOG(ectx, 
+              GE_WARNING | GE_BULK | GE_USER,
+              _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
        return SYSERR;
       }
     } else {
       if (count < anonymityLevel) {
-       GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
-           _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
+       GE_LOG(ectx,
+              GE_WARNING | GE_BULK | GE_USER,
+              _("Cannot satisfy desired level of anonymity, ignoring 
request.\n"));
        return SYSERR;
       }
     }
@@ -1949,9 +1962,10 @@
            hash2enc(&sender->hashPubKey,
                     &enc));
     }
-    GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-        "Dropping query from %s, this peer is too busy.\n",
-        sender == NULL ? "localhost" : (char*)&enc);
+    GE_LOG(ectx, 
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          "Dropping query from %s, this peer is too busy.\n",
+          sender == NULL ? "localhost" : (char*)&enc);
 #endif
     return OK;
   }
@@ -1998,12 +2012,14 @@
   policy = evaluateQuery(sender,
                         &prio);
 #if DEBUG_GAP
-  IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       hash2enc(&qmsg->queries[0],
-                &enc));
-  GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-      "Received GAP query `%s'.\n",
-      &enc);
+  IF_GELOG(ectx,
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          hash2enc(&qmsg->queries[0],
+                   &enc));
+  GE_LOG(ectx, 
+        GE_DEBUG | GE_REQUEST | GE_USER,
+        "Received GAP query `%s'.\n",
+        &enc);
 #endif
   if ((policy & QUERY_DROPMASK) == 0) {
     /* policy says no answer/forward/indirect => direct drop;
@@ -2015,9 +2031,10 @@
            hash2enc(&sender->hashPubKey,
                     &enc));
     }
-    GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
-       "Dropping query from %s, policy decided that this peer is too busy.\n",
-       sender == NULL ? "localhost" : (const char*) &enc);
+    GE_LOG(ectx, 
+          GE_DEBUG | GE_REQUEST | GE_USER,
+          "Dropping query from %s, policy decided that this peer is too 
busy.\n",
+          sender == NULL ? "localhost" : (const char*) &enc);
 #endif
     if (stats != NULL)
       stats->change(stat_routing_direct_drops, 1);

Modified: GNUnet/src/applications/getoption/getoption.c
===================================================================
--- GNUnet/src/applications/getoption/getoption.c       2006-11-12 08:23:21 UTC 
(rev 3718)
+++ GNUnet/src/applications/getoption/getoption.c       2006-11-12 08:28:39 UTC 
(rev 3719)
@@ -46,10 +46,10 @@
   req->section[CS_getoption_request_MESSAGE_OPT_LEN-1] = '\0';
   req->option[CS_getoption_request_MESSAGE_OPT_LEN-1] = '\0';
   val = NULL;
-  if (NO == GC_test_configuration_value(coreAPI->cfg,
+  if (NO == GC_have_configuration_value(coreAPI->cfg,
                                        req->section,
                                        req->option)) 
-    return SYSERR; /* signal error: option not set /*  
+    return SYSERR; /* signal error: option not set */
   if ( (0 != GC_get_configuration_value_string(coreAPI->cfg,
                                               req->section,
                                               req->option,

Modified: GNUnet/src/applications/identity/hostkey.c
===================================================================
--- GNUnet/src/applications/identity/hostkey.c  2006-11-12 08:23:21 UTC (rev 
3718)
+++ GNUnet/src/applications/identity/hostkey.c  2006-11-12 08:28:39 UTC (rev 
3719)
@@ -29,6 +29,8 @@
 #include "gnunet_directories.h"
 #include "platform.h"
 
+#define EXTRA_CHECKS ALLOW_EXTRA_CHECKS
+
 /**
  * Name of the file in which we store the hostkey.
  */

Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2006-11-12 08:23:21 UTC 
(rev 3718)
+++ GNUnet/src/applications/topology_default/topology.c 2006-11-12 08:28:39 UTC 
(rev 3719)
@@ -198,7 +198,7 @@
   }
   IF_GELOG(coreAPI->ectx,
           GE_DEBUG | GE_REQUEST | GE_USER | GE_DEVELOPER,
-          hash2enc(&indexMatch.match,
+          hash2enc(&indexMatch.match.hashPubKey,
                    &enc));
   GE_LOG(coreAPI->ectx,
         GE_DEBUG | GE_REQUEST | GE_USER | GE_DEVELOPER,





reply via email to

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