gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r8323 - in GNUnet/src/applications/dht: module tools


From: gnunet
Subject: [GNUnet-SVN] r8323 - in GNUnet/src/applications/dht: module tools
Date: Wed, 11 Mar 2009 14:46:18 -0600

Author: nevans
Date: 2009-03-11 14:46:18 -0600 (Wed, 11 Mar 2009)
New Revision: 8323

Modified:
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dht/module/routing.h
   GNUnet/src/applications/dht/module/service.c
   GNUnet/src/applications/dht/module/table.c
   GNUnet/src/applications/dht/module/table.h
   GNUnet/src/applications/dht/tools/dv_dht-query.c
   GNUnet/src/applications/dht/tools/dv_dht_api.c
   GNUnet/src/applications/dht/tools/dv_dht_expiration_test.c
   GNUnet/src/applications/dht/tools/dv_dht_forwarding_test.c
   GNUnet/src/applications/dht/tools/dv_dht_loopback_test.c
   GNUnet/src/applications/dht/tools/dv_dht_multipeer_test.c
   GNUnet/src/applications/dht/tools/dv_dht_twopeer_test.c
Log:
pre-commit

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2009-03-11 20:46:03 UTC (rev 
8322)
+++ GNUnet/src/applications/dht/module/cs.c     2009-03-11 20:46:18 UTC (rev 
8323)
@@ -146,7 +146,7 @@
   cpc = GNUNET_malloc (sizeof (struct DV_DHT_CLIENT_GET_RECORD));
   cpc->client = client;
   cpc->get_record = dv_dhtAPI->get_start (ntohl (get->type),
-                                       &get->key, &get_result, cpc);
+                                          &get->key, &get_result, cpc);
   GNUNET_mutex_lock (lock);
   cpc->next = getRecords;
   getRecords = cpc;

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2009-03-11 20:46:03 UTC 
(rev 8322)
+++ GNUnet/src/applications/dht/module/routing.c        2009-03-11 20:46:18 UTC 
(rev 8323)
@@ -288,7 +288,8 @@
       result->header.type = htons (GNUNET_P2P_PROTO_DHT_RESULT);
       result->type = htonl (type);
       result->hop_count = htonl (0);
-      result->network_size = htonl (GNUNET_DV_DHT_estimate_network_diameter 
());
+      result->network_size =
+        htonl (GNUNET_DV_DHT_estimate_network_diameter ());
       result->key = *key;
       memcpy (&result[1], data, size);
     }
@@ -360,9 +361,8 @@
                              GNUNET_GE_DEVELOPER,
                              "Routing result to `%s'\n", &enc);
 #endif
-              dvapi->dv_send(&pos->source,
-                             &result->header, DV_DHT_PRIORITY,
-                             DV_DHT_DELAY);
+              dvapi->dv_send (&pos->source,
+                              &result->header, DV_DHT_PRIORITY, DV_DHT_DELAY);
 
               if (stats != NULL)
                 stats->change (stat_replies_routed, 1);
@@ -402,7 +402,8 @@
  */
 static int
 add_route (const GNUNET_PeerIdentity * sender,
-           GNUNET_ResultProcessor handler, void *cls, const DV_DHT_MESSAGE * 
get)
+           GNUNET_ResultProcessor handler, void *cls,
+           const DV_DHT_MESSAGE * get)
 {
   DV_DHTQueryRecord *q;
   unsigned int i;
@@ -575,8 +576,7 @@
                      GNUNET_GE_DEVELOPER,
                      "Forwarding DV_DHT GET request to peer `%s'.\n", &enc);
 #endif
-      dvapi->dv_send(&next[j], &aget.header, DV_DHT_PRIORITY,
-                     DV_DHT_DELAY);
+      dvapi->dv_send (&next[j], &aget.header, DV_DHT_PRIORITY, DV_DHT_DELAY);
       j++;
     }
   return GNUNET_OK;
@@ -656,8 +656,7 @@
                      GNUNET_GE_DEVELOPER,
                      "Forwarding DV_DHT PUT request to peer `%s'.\n", &enc);
 #endif
-      dvapi->dv_send (&next[j], &aput->header, DV_DHT_PRIORITY,
-                                DV_DHT_DELAY);
+      dvapi->dv_send (&next[j], &aput->header, DV_DHT_PRIORITY, DV_DHT_DELAY);
       j++;
     }
   GNUNET_free (aput);
@@ -730,8 +729,8 @@
  */
 int
 GNUNET_DV_DHT_get_start (const GNUNET_HashCode * key,
-                      unsigned int type, GNUNET_ResultProcessor handler,
-                      void *cls)
+                         unsigned int type, GNUNET_ResultProcessor handler,
+                         void *cls)
 {
   DV_DHT_MESSAGE get;
 #if DEBUG_ROUTING
@@ -763,8 +762,8 @@
  */
 int
 GNUNET_DV_DHT_get_stop (const GNUNET_HashCode * key,
-                     unsigned int type, GNUNET_ResultProcessor handler,
-                     void *cls)
+                        unsigned int type, GNUNET_ResultProcessor handler,
+                        void *cls)
 {
   unsigned int i;
   struct DV_DHT_Source_Route *pos;
@@ -820,7 +819,7 @@
  */
 int
 GNUNET_DV_DHT_put (const GNUNET_HashCode * key,
-                unsigned int type, unsigned int size, const char *data)
+                   unsigned int type, unsigned int size, const char *data)
 {
   DV_DHT_MESSAGE *put;
 

Modified: GNUnet/src/applications/dht/module/routing.h
===================================================================
--- GNUnet/src/applications/dht/module/routing.h        2009-03-11 20:46:03 UTC 
(rev 8322)
+++ GNUnet/src/applications/dht/module/routing.h        2009-03-11 20:46:18 UTC 
(rev 8323)
@@ -35,16 +35,16 @@
  * Start a DV_DHT get operation.
  */
 int GNUNET_DV_DHT_get_start (const GNUNET_HashCode * key,
-                          unsigned int type, GNUNET_ResultProcessor handler,
-                          void *cls);
+                             unsigned int type,
+                             GNUNET_ResultProcessor handler, void *cls);
 
 /**
  * Stop a DV_DHT get operation (prevents calls to
  * the given iterator).
  */
 int GNUNET_DV_DHT_get_stop (const GNUNET_HashCode * key,
-                         unsigned int type, GNUNET_ResultProcessor handler,
-                         void *cls);
+                            unsigned int type, GNUNET_ResultProcessor handler,
+                            void *cls);
 
 /**
  * Perform a DV_DHT put operation.  Note that PUT operations always
@@ -54,7 +54,8 @@
  * @param expiration_time absolute expiration time
  */
 int GNUNET_DV_DHT_put (const GNUNET_HashCode * key,
-                    unsigned int type, unsigned int size, const char *data);
+                       unsigned int type, unsigned int size,
+                       const char *data);
 
 /**
  * Initialize routing DV_DHT component.

Modified: GNUnet/src/applications/dht/module/service.c
===================================================================
--- GNUnet/src/applications/dht/module/service.c        2009-03-11 20:46:03 UTC 
(rev 8322)
+++ GNUnet/src/applications/dht/module/service.c        2009-03-11 20:46:18 UTC 
(rev 8323)
@@ -52,8 +52,8 @@
  */
 static struct GNUNET_DV_DHT_GetHandle *
 dv_dht_get_async_start (unsigned int type,
-                     const GNUNET_HashCode * key,
-                     GNUNET_ResultProcessor callback, void *cls)
+                        const GNUNET_HashCode * key,
+                        GNUNET_ResultProcessor callback, void *cls)
 {
   struct GNUNET_DV_DHT_GetHandle *ret;
 
@@ -77,7 +77,7 @@
 dv_dht_get_async_stop (struct GNUNET_DV_DHT_GetHandle *record)
 {
   GNUNET_DV_DHT_get_stop (&record->key, record->type, record->callback,
-                       record->cls);
+                          record->cls);
   GNUNET_free (record);
   return GNUNET_OK;
 }

Modified: GNUnet/src/applications/dht/module/table.c
===================================================================
--- GNUnet/src/applications/dht/module/table.c  2009-03-11 20:46:03 UTC (rev 
8322)
+++ GNUnet/src/applications/dht/module/table.c  2009-03-11 20:46:18 UTC (rev 
8323)
@@ -356,9 +356,9 @@
  */
 int
 GNUNET_DV_DHT_select_peer (GNUNET_PeerIdentity * set,
-                        const GNUNET_HashCode * target,
-                        const GNUNET_PeerIdentity * blocked,
-                        unsigned int blocked_size)
+                           const GNUNET_HashCode * target,
+                           const GNUNET_PeerIdentity * blocked,
+                           unsigned int blocked_size)
 {
   unsigned long long total_distance;
   unsigned long long selected;
@@ -452,9 +452,9 @@
   if (disco != NULL)
     {
       dvapi->dv_send (other,
-                                &disco->header,
-                                GNUNET_EXTREME_PRIORITY / 4,
-                                MAINTAIN_FREQUENCY * MAINTAIN_CHANCE / 2);
+                      &disco->header,
+                      GNUNET_EXTREME_PRIORITY / 4,
+                      MAINTAIN_FREQUENCY * MAINTAIN_CHANCE / 2);
       return;
     }
   pc = total_peers;
@@ -487,7 +487,7 @@
   disco->header.size =
     htons (pc * sizeof (GNUNET_PeerIdentity) + sizeof (P2P_DV_DHT_Discovery));
   dvapi->dv_send (other, &disco->header, 0,
-                            MAINTAIN_FREQUENCY * MAINTAIN_CHANCE / 2);
+                  MAINTAIN_FREQUENCY * MAINTAIN_CHANCE / 2);
   GNUNET_free (disco);
 }
 
@@ -512,13 +512,13 @@
       disc.header.size = htons (sizeof (P2P_DV_DHT_Discovery));
       disc.header.type = htons (GNUNET_P2P_PROTO_DHT_DISCOVERY);
       disc.space_available = -1;        /* FIXME */
-      dvapi->dv_connections_iterate(&broadcast_dht_discovery_prob, &disc);
-      /*coreAPI->p2p_connections_iterate (&broadcast_dht_discovery_prob, 
&disc);*/
+      dvapi->dv_connections_iterate (&broadcast_dht_discovery_prob, &disc);
+      /*coreAPI->p2p_connections_iterate (&broadcast_dht_discovery_prob, 
&disc); */
     }
   else
     {
-      dvapi->dv_connections_iterate(&broadcast_dht_discovery_prob, NULL);
-      /*coreAPI->p2p_connections_iterate (&broadcast_dht_discovery_prob, 
NULL);*/
+      dvapi->dv_connections_iterate (&broadcast_dht_discovery_prob, NULL);
+      /*coreAPI->p2p_connections_iterate (&broadcast_dht_discovery_prob, 
NULL); */
     }
 }
 
@@ -639,8 +639,8 @@
       ask.header.type = htons (sizeof (GNUNET_P2P_PROTO_DHT_ASK_HELLO));
       ask.reserved = 0;
       ask.peer = *peer;
-      dvapi->dv_send (sender, &ask.header, 0, /* FIXME: priority */
-                                5 * GNUNET_CRON_SECONDS);
+      dvapi->dv_send (sender, &ask.header, 0,   /* FIXME: priority */
+                      5 * GNUNET_CRON_SECONDS);
       return;
     }
   GNUNET_free (hello);
@@ -731,8 +731,7 @@
                               GNUNET_NO);
   if (hello == NULL)
     return GNUNET_OK;
-  dvapi->dv_send (sender, &hello->header, 0,
-                            5 * GNUNET_CRON_SECONDS);
+  dvapi->dv_send (sender, &hello->header, 0, 5 * GNUNET_CRON_SECONDS);
   GNUNET_free (hello);
   return GNUNET_OK;
 }
@@ -791,7 +790,8 @@
       stat_dht_discoveries =
         stats->create (gettext_noop ("# dv_dht discovery messages received"));
       stat_dht_route_looks =
-        stats->create (gettext_noop ("# dv_dht route host lookups performed"));
+        stats->
+        create (gettext_noop ("# dv_dht route host lookups performed"));
       stat_dht_advertisements =
         stats->create (gettext_noop ("# dv_dht discovery messages sent"));
     }

Modified: GNUnet/src/applications/dht/module/table.h
===================================================================
--- GNUnet/src/applications/dht/module/table.h  2009-03-11 20:46:03 UTC (rev 
8322)
+++ GNUnet/src/applications/dht/module/table.h  2009-03-11 20:46:18 UTC (rev 
8323)
@@ -43,9 +43,9 @@
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int GNUNET_DV_DHT_select_peer (GNUNET_PeerIdentity * set,
-                            const GNUNET_HashCode * target,
-                            const GNUNET_PeerIdentity * blocked,
-                            unsigned int blocked_size);
+                               const GNUNET_HashCode * target,
+                               const GNUNET_PeerIdentity * blocked,
+                               unsigned int blocked_size);
 
 /**
  * Compute a (rough) estimate of the networks diameter.

Modified: GNUnet/src/applications/dht/tools/dv_dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht-query.c    2009-03-11 20:46:03 UTC 
(rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht-query.c    2009-03-11 20:46:18 UTC 
(rev 8323)
@@ -51,7 +51,7 @@
  */
 static struct GNUNET_CommandLineOption gnunetqueryOptions[] = {
   GNUNET_COMMAND_LINE_OPTION_CFG_FILE (&cfgFilename),   /* -c */
-  GNUNET_COMMAND_LINE_OPTION_HELP (gettext_noop ("Query (get KEY, put KEY 
VALUE) DV_DHT table.")), /* -h */
+  GNUNET_COMMAND_LINE_OPTION_HELP (gettext_noop ("Query (get KEY, put KEY 
VALUE) DV_DHT table.")),      /* -h */
   GNUNET_COMMAND_LINE_OPTION_HOSTNAME,  /* -H */
   GNUNET_COMMAND_LINE_OPTION_LOGGING,   /* -L */
   {'T', "timeout", "TIME",
@@ -84,7 +84,7 @@
                  "Issuing `%s(%s)' command.\n", "get", key);
 #endif
   ret = GNUNET_DV_DHT_get_start (ctx, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                              &hc);
+                                 &hc);
   if (ret == NULL)
     {
       printf ("`%s(%s)' failed.\n", "get", key);
@@ -107,8 +107,9 @@
                  _("Issuing `%s(%s,%s)' command.\n"), "put", key, value);
 #endif
   if (GNUNET_OK ==
-      GNUNET_DV_DHT_put (cfg, ectx, &hc, 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                      strlen (value), value))
+      GNUNET_DV_DHT_put (cfg, ectx, &hc,
+                         GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                         strlen (value), value))
     {
       printf ("`%s(%s,%s)' succeeded\n", "put", key, value);
     }

Modified: GNUnet/src/applications/dht/tools/dv_dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_api.c      2009-03-11 20:46:03 UTC 
(rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_api.c      2009-03-11 20:46:18 UTC 
(rev 8323)
@@ -175,11 +175,11 @@
  */
 struct GNUNET_DV_DHT_Context *
 GNUNET_DV_DHT_context_create (struct GNUNET_GC_Configuration
-                           *cfg,
-                           struct GNUNET_GE_Context
-                           *ectx,
-                           GNUNET_ResultProcessor
-                           resultCallback, void *resCallbackClosure)
+                              *cfg,
+                              struct GNUNET_GE_Context
+                              *ectx,
+                              GNUNET_ResultProcessor
+                              resultCallback, void *resCallbackClosure)
 {
   struct GNUNET_DV_DHT_Context *ctx;
   struct GNUNET_ClientServerConnection *sock;
@@ -214,7 +214,7 @@
  */
 struct GNUNET_DV_DHT_GetRequest *
 GNUNET_DV_DHT_get_start (struct GNUNET_DV_DHT_Context *ctx,
-                      unsigned int type, const GNUNET_HashCode * key)
+                         unsigned int type, const GNUNET_HashCode * key)
 {
   struct GNUNET_DV_DHT_GetRequest *req;
 
@@ -242,7 +242,7 @@
  */
 int
 GNUNET_DV_DHT_get_stop (struct GNUNET_DV_DHT_Context *ctx,
-                     struct GNUNET_DV_DHT_GetRequest *req)
+                        struct GNUNET_DV_DHT_GetRequest *req)
 {
   CS_dht_request_get_MESSAGE creq;
 
@@ -293,9 +293,9 @@
  */
 int
 GNUNET_DV_DHT_put (struct GNUNET_GC_Configuration *cfg,
-                struct GNUNET_GE_Context *ectx,
-                const GNUNET_HashCode * key,
-                unsigned int type, unsigned int size, const char *value)
+                   struct GNUNET_GE_Context *ectx,
+                   const GNUNET_HashCode * key,
+                   unsigned int type, unsigned int size, const char *value)
 {
   struct GNUNET_ClientServerConnection *sock;
   CS_dht_request_put_MESSAGE *req;

Modified: GNUnet/src/applications/dht/tools/dv_dht_expiration_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_expiration_test.c  2009-03-11 
20:46:03 UTC (rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_expiration_test.c  2009-03-11 
20:46:18 UTC (rev 8323)
@@ -90,24 +90,25 @@
                                             ectx,
                                             "NETWORK", "HOST",
                                             "localhost:2087");
-  ctx = GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, unused_cls);
+  ctx =
+    GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, unused_cls);
   CHECK (ctx != NULL);
   /* actual test code */
   GNUNET_hash ("expired_key", 4, &key);
   value = GNUNET_malloc (8);
   memset (value, 'A', 8);
   CHECK (GNUNET_OK == GNUNET_DV_DHT_put (cfg,
-                                      ectx,
-                                      &key,
-                                      
GNUNET_ECRS_BLOCKTYP_DV_DHT_STRING2STRING,
-                                      8, value));
+                                         ectx,
+                                         &key,
+                                         
GNUNET_ECRS_BLOCKTYP_DV_DHT_STRING2STRING,
+                                         8, value));
   /* FIXME: this value has to be >> than the expiration
      time (which is currently fixed to 12h, so we can not
      really do this test in practice... */
   GNUNET_thread_sleep (60 * GNUNET_CRON_SECONDS);
   CHECK (1 == GNUNET_DV_DHT_get_start (ctx,
-                                    GNUNET_ECRS_BLOCKTYP_DV_DHT_STRING2STRING,
-                                    &key));
+                                       
GNUNET_ECRS_BLOCKTYP_DV_DHT_STRING2STRING,
+                                       &key));
   GNUNET_thread_sleep (15 * GNUNET_CRON_SECONDS);
   GNUNET_DV_DHT_context_destroy (ctx);
 

Modified: GNUnet/src/applications/dht/tools/dv_dht_forwarding_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_forwarding_test.c  2009-03-11 
20:46:03 UTC (rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_forwarding_test.c  2009-03-11 
20:46:18 UTC (rev 8323)
@@ -197,10 +197,10 @@
           GNUNET_hash (buf, strlen (buf), &key);
           memset (value, 'A' + i, sizeof (value));
           CHECK (GNUNET_OK == GNUNET_DV_DHT_put (cfg,
-                                              ectx,
-                                              &key,
-                                              
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                              sizeof (value), value));
+                                                 ectx,
+                                                 &key,
+                                                 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                                 sizeof (value), value));
         }
       printf ("\n");
       /* get loop */
@@ -212,7 +212,8 @@
           GNUNET_GC_set_configuration_value_string (cfg,
                                                     ectx, "NETWORK", "HOST",
                                                     buf);
-          dctx = GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, 
&c);
+          dctx =
+            GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, &c);
           printf ("Peer %d gets key", i);
           fflush (stdout);
           for (j = 0; j < NUM_PEERS; j++)
@@ -227,8 +228,8 @@
               fflush (stdout);
               last = found;
               get1 = GNUNET_DV_DHT_get_start (dctx,
-                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                           &key);
+                                              
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                              &key);
               GNUNET_GE_ASSERT (NULL, get1 != NULL);
               for (k = 0; k < NUM_ROUNDS; k++)
                 {

Modified: GNUnet/src/applications/dht/tools/dv_dht_loopback_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_loopback_test.c    2009-03-11 
20:46:03 UTC (rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_loopback_test.c    2009-03-11 
20:46:18 UTC (rev 8323)
@@ -114,22 +114,22 @@
   value = GNUNET_malloc (8);
   memset (value, 'A', 8);
   CHECK (GNUNET_OK == GNUNET_DV_DHT_put (cfg,
-                                      ectx,
-                                      &key,
-                                      GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                      8, value));
+                                         ectx,
+                                         &key,
+                                         
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                         8, value));
   i = 'A';
   CHECK (NULL != (get1 = GNUNET_DV_DHT_get_start (ctx,
-                                               
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                               &key)));
+                                                  
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                                  &key)));
   GNUNET_hash ("key_for_B", 3, &key);
   value = GNUNET_malloc (8);
   memset (value, 'B', 8);
   CHECK (GNUNET_OK == GNUNET_DV_DHT_put (cfg,
-                                      ectx,
-                                      &key,
-                                      GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                      8, value));
+                                         ectx,
+                                         &key,
+                                         
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                         8, value));
   left = 10;
   while ((found == 0) && (--left >= 0))
     GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
@@ -139,8 +139,8 @@
   GNUNET_DV_DHT_get_stop (ctx, get1);
   i = 'B';
   CHECK (NULL != (get2 = GNUNET_DV_DHT_get_start (ctx,
-                                               
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                               &key)));
+                                                  
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                                  &key)));
   left = 10;
   while ((found == 0) && (--left >= 0))
     GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);

Modified: GNUnet/src/applications/dht/tools/dv_dht_multipeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_multipeer_test.c   2009-03-11 
20:46:03 UTC (rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_multipeer_test.c   2009-03-11 
20:46:18 UTC (rev 8323)
@@ -197,10 +197,10 @@
           GNUNET_hash (buf, strlen (buf), &key);
           memset (value, 'A' + i, sizeof (value));
           CHECK (GNUNET_OK == GNUNET_DV_DHT_put (cfg,
-                                              ectx,
-                                              &key,
-                                              
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                              sizeof (value), value));
+                                                 ectx,
+                                                 &key,
+                                                 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                                 sizeof (value), value));
         }
       printf ("\n");
       /* get loop */
@@ -212,7 +212,8 @@
           GNUNET_GC_set_configuration_value_string (cfg,
                                                     ectx, "NETWORK", "HOST",
                                                     buf);
-          dctx = GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, 
&c);
+          dctx =
+            GNUNET_DV_DHT_context_create (cfg, ectx, &result_callback, &c);
           printf ("Peer %d gets key", i);
           fflush (stdout);
           for (j = 0; j < NUM_PEERS; j++)
@@ -227,8 +228,8 @@
               fflush (stdout);
               last = found;
               get1 = GNUNET_DV_DHT_get_start (dctx,
-                                           
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                           &key);
+                                              
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                              &key);
               GNUNET_GE_ASSERT (NULL, get1 != NULL);
               for (k = 0; k < NUM_ROUNDS; k++)
                 {

Modified: GNUnet/src/applications/dht/tools/dv_dht_twopeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dv_dht_twopeer_test.c     2009-03-11 
20:46:03 UTC (rev 8322)
+++ GNUnet/src/applications/dht/tools/dv_dht_twopeer_test.c     2009-03-11 
20:46:18 UTC (rev 8323)
@@ -124,10 +124,10 @@
   GNUNET_hash (keys, 5, &key);
   memset (value, val, sizeof (value));
   CHECK (GNUNET_OK == GNUNET_DV_DHT_put (pd->cfg,
-                                      NULL,
-                                      &key,
-                                      GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                      sizeof (value), value));
+                                         NULL,
+                                         &key,
+                                         
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                         sizeof (value), value));
 FAILURE:
   return ret;
 }
@@ -144,8 +144,8 @@
   pd->peercount = 10;
   pd->expect_i = want;
   CHECK (NULL != (get = GNUNET_DV_DHT_get_start (pd->ctx_peer,
-                                              
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                              &key)));
+                                                 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                                                 &key)));
   for (k = 0; k < NUM_ROUNDS; k++)
     {
       if (0 == (k % 10))





reply via email to

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