gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11811 - gnunet/src/dv


From: gnunet
Subject: [GNUnet-SVN] r11811 - gnunet/src/dv
Date: Fri, 18 Jun 2010 18:11:03 +0200

Author: nevans
Date: 2010-06-18 18:11:03 +0200 (Fri, 18 Jun 2010)
New Revision: 11811

Modified:
   gnunet/src/dv/dv.h
   gnunet/src/dv/dv_api.c
   gnunet/src/dv/gnunet-service-dv.c
   gnunet/src/dv/plugin_transport_dv.c
   gnunet/src/dv/test_transport_api_dv.c
   gnunet/src/dv/test_transport_dv_data.conf
Log:
dv changes, better logging and so on

Modified: gnunet/src/dv/dv.h
===================================================================
--- gnunet/src/dv/dv.h  2010-06-18 15:55:33 UTC (rev 11810)
+++ gnunet/src/dv/dv.h  2010-06-18 16:11:03 UTC (rev 11811)
@@ -28,13 +28,13 @@
 
 #include "gnunet_common.h"
 
-#define DEBUG_DV_GOSSIP GNUNET_YES
+#define DEBUG_DV_GOSSIP GNUNET_NO
 #define DEBUG_DV_GOSSIP_SEND GNUNET_NO
 #define DEBUG_DV_GOSSIP_RECEIPT GNUNET_NO
-#define DEBUG_DV_MESSAGES GNUNET_NO
+#define DEBUG_DV_MESSAGES GNUNET_YES
 #define DEBUG_DV GNUNET_NO
 #define DEBUG_DV_PEER_NUMBERS GNUNET_NO
-#define DEBUG_MESSAGE_DROP GNUNET_YES
+#define DEBUG_MESSAGE_DROP GNUNET_NO
 
 typedef void (*GNUNET_DV_MessageReceivedHandler) (void *cls,
                                                   struct GNUNET_PeerIdentity 
*sender,
@@ -229,7 +229,7 @@
 {
   struct GNUNET_MessageHeader header;
 
-#if TRACK_MESSAGES
+#if DEBUG_DV_MESSAGES
   /**
    * Unique ID for this message.
    */

Modified: gnunet/src/dv/dv_api.c
===================================================================
--- gnunet/src/dv/dv_api.c      2010-06-18 15:55:33 UTC (rev 11810)
+++ gnunet/src/dv/dv_api.c      2010-06-18 16:11:03 UTC (rev 11811)
@@ -345,10 +345,6 @@
   GNUNET_HashCode uidhash;
   struct SendCallbackContext *send_ctx;
 
-#if DEBUG_DV
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "dv api receives message!\n");
-#endif
-
   if (msg == NULL)
   {
     return; /* Connection closed? */
@@ -367,9 +363,6 @@
     sender_address_len = ntohl(received_msg->sender_address_len);
 
     GNUNET_assert(ntohs(msg->size) == (sizeof(struct 
GNUNET_DV_MessageReceived) + packed_msg_len + sender_address_len));
-#if DEBUG_DV
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "dv api receives message, size checks 
out!\n");
-#endif
     sender_address = GNUNET_malloc(sender_address_len);
     memcpy(sender_address, &received_msg[1], sender_address_len);
     packed_msg_start = (char *)&received_msg[1];
@@ -399,13 +392,9 @@
     send_result_msg = (struct GNUNET_DV_SendResultMessage *)msg;
     hash_from_uid(ntohl(send_result_msg->uid), &uidhash);
     send_ctx = GNUNET_CONTAINER_multihashmap_get(handle->send_callbacks, 
&uidhash);
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "got uid of %u or %u, hash of %s 
!!!!\n", ntohl(send_result_msg->uid), send_result_msg->uid, 
GNUNET_h2s(&uidhash));
 
     if ((send_ctx != NULL) && (send_ctx->cont != NULL))
       {
-#if DEBUG_DV
-        GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "dv api notifies transport of send 
result (%u)!\n", ntohl(send_result_msg->result));
-#endif
         if (ntohl(send_result_msg->result) == 0)
           {
             send_ctx->cont(send_ctx->cont_cls, &send_ctx->target, GNUNET_OK);
@@ -458,7 +447,6 @@
   GNUNET_HashCode uidhash;
 #if DEBUG_DV_MESSAGES
   dv_handle->uid_gen = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_STRONG, 
UINT32_MAX);
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "GNUNET_DV_send called with message of 
size %d, address size %d, total size %d, uid %u\n", msgbuf_size, addrlen, 
sizeof(struct GNUNET_DV_SendMessage) + msgbuf_size + addrlen, 
dv_handle->uid_gen);
 #else
   dv_handle->uid_gen++;
 #endif

Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c   2010-06-18 15:55:33 UTC (rev 11810)
+++ gnunet/src/dv/gnunet-service-dv.c   2010-06-18 16:11:03 UTC (rev 11811)
@@ -521,6 +521,13 @@
    * Timeout for this message
    */
   struct GNUNET_TIME_Relative timeout;
+
+#if DEBUG_DV_MESSAGES
+  /**
+   * Unique ID for DV message
+   */
+  unsigned int uid;
+#endif
 };
 
 /**
@@ -957,12 +964,16 @@
   toSend->header.type = htons (GNUNET_MESSAGE_TYPE_DV_DATA);
   toSend->sender = htonl (sender_id);
   toSend->recipient = htonl (recipient_id);
+#if DEBUG_DV_MESSAGES
+  toSend->uid = send_context->uid; /* Still sent around in network byte order 
*/
+#endif
+
   memcpy (&toSend[1], send_context->message, send_context->message_size);
 
 #if DEBUG_DV
-  memcpy(&shortname, GNUNET_i2s(&specific_neighbor->identity), 4);
+  memcpy(&shortname, GNUNET_i2s(send_context->distant_peer), 4);
   shortname[4] = '\0';
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Notifying core of send to 
destination `%s' via `%s' size %u\n", "DV", &shortname, 
GNUNET_i2s(&specific_neighbor->referrer->identity), msg_size);
+  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Notifying core of send to 
destination `%s' via `%s' size %u\n", "DV", &shortname, GNUNET_i2s(recipient), 
msg_size);
 #endif
 
   GNUNET_CONTAINER_DLL_insert_after (core_pending_head,
@@ -973,8 +984,11 @@
   if (core_transmit_handle == NULL)
     core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
send_context->importance, send_context->timeout, recipient, msg_size, 
&core_transmit_notify, NULL);
   else
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "`%s': Failed to schedule pending 
transmission (must be one in progress!)\n", "dv service");
-
+    {
+#if DEBUG_DV
+      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "`%s': Failed to schedule pending 
transmission (must be one in progress!)\n", "dv service");
+#endif
+    }
   return GNUNET_YES;
 }
 
@@ -1026,6 +1040,9 @@
  * @param message the packed message
  * @param message_size size of the message
  * @param importance what priority to send this message with
+#if DEBUG_DV_MESSAGES
+ * @param uid unique id for this message
+#endif
  * @param timeout how long to possibly delay sending this message
  */
 static int
@@ -1034,7 +1051,11 @@
               const struct DistantNeighbor * specific_neighbor,
               const struct GNUNET_MessageHeader * message,
               size_t message_size,
-              unsigned int importance, struct GNUNET_TIME_Relative timeout)
+              unsigned int importance,
+#if DEBUG_DV_MESSAGES
+              unsigned int uid,
+#endif
+              struct GNUNET_TIME_Relative timeout)
 {
   p2p_dv_MESSAGE_Data *toSend;
   unsigned int msg_size;
@@ -1114,6 +1135,9 @@
   toSend->header.type = htons (GNUNET_MESSAGE_TYPE_DV_DATA);
   toSend->sender = htonl (sender_id);
   toSend->recipient = htonl (recipient_id);
+#if DEBUG_DV_MESSAGES
+  toSend->uid = htonl(uid);
+#endif
 #if DEBUG_DV_PEER_NUMBERS
   GNUNET_CRYPTO_hash_to_enc (&target->identity.hashPubKey, &encPeerTo);
   encPeerTo.encoding[4] = '\0';
@@ -1206,9 +1230,7 @@
   struct CheckPeerContext checkPeerCtx;
 #endif
   char *sender_id;
-
   char *direct_id;
-
   int ret;
   size_t packed_message_size;
   char *cbuf;
@@ -1299,9 +1321,9 @@
         {
           packed_message = (struct GNUNET_MessageHeader *)&cbuf[offset];
 
-#if DEBUG_DV
+#if DEBUG_DV_MESSAGES
           GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                      "%s: Receives %s message for me, size %d type %d, cost 
%u!\n", "dv", "DV DATA", ntohs(packed_message->size), 
ntohs(packed_message->type), pos->cost);
+                      "%s: Receives %s message for me, uid %u, size %d type 
%d, cost %u from %s!\n", my_short_id, "DV DATA", ntohl(incoming->uid), 
ntohs(packed_message->size), ntohs(packed_message->type), pos->cost, 
GNUNET_i2s(&pos->identity));
 #endif
           GNUNET_break_op (ntohs (packed_message->type) != 
GNUNET_MESSAGE_TYPE_DV_GOSSIP);
           GNUNET_break_op (ntohs (packed_message->type) != 
GNUNET_MESSAGE_TYPE_DV_DATA);
@@ -1337,9 +1359,9 @@
 
   if (fdc.dest == NULL)
     {
-#if DEBUG_DV
+#if DEBUG_DV_MESSAGES
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "%s: Receives %s message for someone else that we don't know 
(id %u)!\n", "dv", "DV DATA", tid);
+                  "%s: Receives %s message uid %u for someone we don't know 
(id %u)!\n", my_short_id, "DV DATA", ntohl(incoming->uid), tid);
 #endif
     return GNUNET_OK;
     }
@@ -1352,10 +1374,10 @@
       GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "\n\n\nLoopy loo message\n\n\n");
 #endif
 
-#if DEBUG_MESSAGE_DROP
+#if DEBUG_DV_MESSAGES
       direct_id = GNUNET_strdup(GNUNET_i2s(&dn->identity));
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "%s: DROPPING MESSAGE type %d, routing loop! Message 
immediately from %s!\n", GNUNET_i2s(&my_identity), ntohs(((struct 
GNUNET_MessageHeader *)&incoming[1])->type), direct_id);
+                  "%s: DROPPING MESSAGE uid %u type %d, routing loop! Message 
immediately from %s!\n", my_short_id, ntohl(incoming->uid), 
ntohs(packed_message->type), direct_id);
 #endif
       return GNUNET_OK;
     }
@@ -1370,12 +1392,22 @@
                       &original_sender,
                       packed_message, DV_PRIORITY, DV_DELAY);*/
 
-#if DEBUG_DV
+#if DEBUG_DV_MESSAGES
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "%s: Sends message size %d on!\n", "dv", packed_message_size);
+              "%s: FORWARD %s message for %s, uid %u, size %d type %d, cost 
%u!\n", my_short_id, "DV DATA", GNUNET_i2s(&destination), ntohl(incoming->uid), 
ntohs(packed_message->size), ntohs(packed_message->type), pos->cost);
 #endif
-  ret = send_message(&destination, &original_sender, NULL, packed_message, 
packed_message_size, default_dv_priority, GNUNET_TIME_relative_get_forever());
 
+  ret = send_message(&destination,
+                     &original_sender,
+                     NULL,
+                     packed_message,
+                     packed_message_size,
+                     default_dv_priority,
+#if DEBUG_DV_MESSAGES
+                     ntohl(incoming->uid),
+#endif
+                     GNUNET_TIME_relative_get_forever());
+
   if (ret != GNUNET_SYSERR)
     return GNUNET_OK;
   else
@@ -1612,10 +1644,13 @@
   struct GNUNET_PeerIdentity *direct;
   struct GNUNET_MessageHeader *message_buf;
   char *temp_pos;
-
   int offset;
   static struct GNUNET_CRYPTO_HashAsciiEncoded dest_hash;
   struct DV_SendContext *send_context;
+#if DEBUG_DV_MESSAGES
+  char *cbuf;
+  struct GNUNET_MessageHeader *packed_message;
+#endif
 
   if (client_handle == NULL)
   {
@@ -1663,12 +1698,19 @@
       GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "%s: asked to send message to 
`%s', but address is for `%s'!", "DV SERVICE", GNUNET_i2s(&send_msg->target), 
(const char *)&dest_hash.encoding);
     }
 
-
+#if DEBUG_DV_MESSAGES
+  cbuf = (char *)message_buf;
+  offset = 0;
+  while(offset < message_size)
+    {
+      packed_message = (struct GNUNET_MessageHeader *)&cbuf[offset];
+      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: DV PLUGIN SEND uid %u type %d 
to %s\n", my_short_id, ntohl(send_msg->uid), ntohs(packed_message->type), 
GNUNET_i2s(destination));
+      offset += ntohs(packed_message->size);
+    }
+  /*GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: DV PLUGIN SEND uid %u type %d to 
%s\n", my_short_id, ntohl(send_msg->uid), ntohs(message_buf->type), 
GNUNET_i2s(destination));*/
+#endif
   GNUNET_CRYPTO_hash_to_enc (&destination->hashPubKey, &dest_hash); /* 
GNUNET_i2s won't properly work, need to hash one ourselves */
   dest_hash.encoding[4] = '\0';
-#if DEBUG_DV_MESSAGES
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s DV SEND called with message of size 
%d type %d, destination `%s' via `%s'\n", my_short_id, message_size, 
ntohs(message_buf->type), (const char *)&dest_hash.encoding, 
GNUNET_i2s(direct));
-#endif
   send_context = GNUNET_malloc(sizeof(struct DV_SendContext));
 
   send_result_msg = GNUNET_malloc(sizeof(struct GNUNET_DV_SendResultMessage));
@@ -1683,6 +1725,9 @@
   send_context->message = message_buf;
   send_context->message_size = message_size;
   send_context->send_result = send_result_msg;
+#if DEBUG_DV_MESSAGES
+  send_context->uid = send_msg->uid;
+#endif
 
   if (send_message_via(&my_identity, direct, send_context) != GNUNET_YES)
     {
@@ -1922,6 +1967,7 @@
   return GNUNET_YES;
 }
 
+
 /**
  * Task run during shutdown.
  *
@@ -2268,6 +2314,8 @@
   size_t offset;
   size_t size;
   size_t ret;
+  char *addr1;
+  char *addr2;
 
   if (hello_context->addresses_to_add == 0)
     return 0;
@@ -2283,6 +2331,11 @@
   offset += sizeof(struct GNUNET_PeerIdentity);
   /* Copy the direct peer identity to buffer */
   memcpy(&addr_buffer[offset], hello_context->direct_peer, sizeof(struct 
GNUNET_PeerIdentity));
+  addr1 = GNUNET_strdup(GNUNET_i2s(hello_context->direct_peer));
+  addr2 = GNUNET_strdup(GNUNET_i2s(&hello_context->distant_peer));
+  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: GIVING HELLO %s%s%s to 
TRANSPORT\n", my_short_id,my_short_id, addr1, addr2);
+  GNUNET_free(addr1);
+  GNUNET_free(addr2);
   ret = GNUNET_HELLO_add_address ("dv",
                                   GNUNET_TIME_relative_to_absolute
                                   (GNUNET_TIME_UNIT_HOURS), addr_buffer, size,
@@ -2442,7 +2495,52 @@
   return GNUNET_YES;
 }
 
+#if INSANE_GOSSIP
 /**
+ * Iterator over hash map entries.
+ *
+ * @param cls closure
+ * @param key current key code
+ * @param value value in the hash map
+ * @return GNUNET_YES if we should continue to
+ *         iterate,
+ *         GNUNET_NO if not.
+ */
+static int gossip_all_to_all_iterator (void *cls,
+                                      const GNUNET_HashCode * key,
+                                      void *value)
+{
+  struct DirectNeighbor *direct = value;
+
+  GNUNET_CONTAINER_multihashmap_iterate (ctx.extended_neighbors, 
&add_all_extended_peers, direct->send_context);
+
+  if (direct->send_context->task != GNUNET_SCHEDULER_NO_TASK)
+    GNUNET_SCHEDULER_cancel(sched, direct->send_context->task);
+
+  direct->send_context->task = GNUNET_SCHEDULER_add_now(sched, 
&neighbor_send_task, direct->send_context);
+  return GNUNET_YES;
+}
+
+/**
+ * Task run during shutdown.
+ *
+ * @param cls unused
+ * @param tc unused
+ */
+static void
+gossip_all_to_all (void *cls,
+                   const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  GNUNET_CONTAINER_multihashmap_iterate (ctx.direct_neighbors, 
&gossip_all_to_all_iterator, NULL);
+
+  GNUNET_SCHEDULER_add_delayed (sched,
+                                
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
+                                &gossip_all_to_all,
+                                NULL);
+
+}
+#endif
+/**
  * Iterate over all current direct peers, add newly connected peer
  * to the fast gossip list for that peer so we get DV routing
  * information out as fast as possible!
@@ -2769,6 +2867,12 @@
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &shutdown_task,
                                 NULL);
+#if INSANE_GOSSIP
+  GNUNET_SCHEDULER_add_delayed (sched,
+                                
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
+                                &gossip_all_to_all,
+                                NULL);
+#endif
 }
 
 

Modified: gnunet/src/dv/plugin_transport_dv.c
===================================================================
--- gnunet/src/dv/plugin_transport_dv.c 2010-06-18 15:55:33 UTC (rev 11810)
+++ gnunet/src/dv/plugin_transport_dv.c 2010-06-18 16:11:03 UTC (rev 11811)
@@ -240,24 +240,7 @@
 {
   int ret = 0;
   struct Plugin *plugin = cls;
-  const char *tempbuf;
-  int temp_size;
-#if DEBUG_DV
-  char *my_identity;
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "DV API: Received send request from 
transport, calling GNUNET_DV_send\n");
-  my_identity = GNUNET_strdup(GNUNET_i2s(plugin->env->my_identity));
-#endif
-  temp_size = htons(((struct GNUNET_MessageHeader *)msgbuf)->size);
-  if (msgbuf_size > temp_size)
-    {
-      tempbuf = &msgbuf[temp_size];
-#if DEBUG_DV
-      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s DV PLUGIN SEND SPECIAL type %d 
to %s\n", my_identity, ntohs(((struct GNUNET_MessageHeader *)tempbuf)->type), 
GNUNET_i2s(target));
-#endif
-    }
-#if DEBUG_DV
-  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s DV PLUGIN SEND type %d to %s\n", 
my_identity, ntohs(((struct GNUNET_MessageHeader *)msgbuf)->type), 
GNUNET_i2s(target));
-#endif
+
   ret = GNUNET_DV_send(plugin->dv_handle,
                        target,
                        msgbuf,
@@ -287,7 +270,7 @@
  */
 static void
 dv_plugin_disconnect (void *cls,
-                            const struct GNUNET_PeerIdentity *target)
+                      const struct GNUNET_PeerIdentity *target)
 {
   // struct Plugin *plugin = cls;
   // TODO: Add message type to send to dv service to "disconnect" a peer
@@ -318,7 +301,25 @@
                                   GNUNET_TRANSPORT_AddressStringCallback
                                   asc, void *asc_cls)
 {
-  asc (asc_cls, NULL);
+  char *dest_peer;
+  char *via_peer;
+  char *print_string;
+  char *addr_buf = (char *)addr;
+
+  if (addrlen != sizeof(struct GNUNET_PeerIdentity) * 2)
+    {
+      asc (asc_cls, NULL);
+    }
+  else
+    {
+      dest_peer = GNUNET_strdup(GNUNET_i2s((struct GNUNET_PeerIdentity 
*)addr));
+      via_peer = GNUNET_strdup(GNUNET_i2s((struct GNUNET_PeerIdentity 
*)&addr_buf[sizeof(struct GNUNET_PeerIdentity)]));
+      GNUNET_asprintf(&print_string, "DV Peer `%s' via peer`%s'", dest_peer, 
via_peer);
+      asc (asc_cls, print_string);
+      asc (asc_cls, NULL);
+      GNUNET_free(dest_peer);
+      GNUNET_free(print_string);
+    }
 }
 
 /**

Modified: gnunet/src/dv/test_transport_api_dv.c
===================================================================
--- gnunet/src/dv/test_transport_api_dv.c       2010-06-18 15:55:33 UTC (rev 
11810)
+++ gnunet/src/dv/test_transport_api_dv.c       2010-06-18 16:11:03 UTC (rev 
11811)
@@ -296,12 +296,13 @@
   if (pos->uid != ntohl(msg->uid))
     return GNUNET_OK;
 
+  GNUNET_assert(0 == memcmp(peer, &pos->peer1->id, sizeof(struct 
GNUNET_PeerIdentity)));
   if (total_other_expected_messages == 0)
     {
       total_messages_received++;
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Received message from `%4s', type %d, distance %u.\n", 
GNUNET_i2s (peer), ntohs(message->type), distance);
+                  "Received message from `%4s', type %d, uid %u, distance 
%u.\n", GNUNET_i2s (peer), ntohs(message->type), ntohl(msg->uid), distance);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Total messages received %d, expected %d.\n", 
total_messages_received, expected_messages);
 #endif
@@ -311,7 +312,7 @@
       total_other_messages++;
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Received message from `%4s', type %d, distance %u.\n", 
GNUNET_i2s (peer), ntohs(message->type), distance);
+                  "Received message from `%4s', type %d, uid %u, distance 
%u.\n", GNUNET_i2s (peer), ntohs(message->type), ntohl(msg->uid), distance);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Total messages received %d, expected %d.\n", 
total_other_messages, total_other_expected_messages);
 #endif
@@ -320,7 +321,7 @@
   if ((total_messages_received == expected_messages) && (total_other_messages 
== 0))
     {
       GNUNET_SCHEDULER_cancel (sched, die_task);
-      GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 40), &send_other_messages, NULL);
+      GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_SECONDS, 45), &send_other_messages, NULL);
     }
   else if ((total_other_expected_messages > 0) && (total_other_messages == 
total_other_expected_messages))
     {
@@ -801,7 +802,7 @@
       temp_context->peer1 = d;
       temp_context->peer2 = second_daemon;
       temp_context->next = other_test_messages;
-      temp_context->uid = total_connections;
+      temp_context->uid = total_connections + temp_total_other_messages;
       temp_context->disconnect_task = GNUNET_SCHEDULER_NO_TASK;
       other_test_messages = temp_context;
     }
@@ -818,6 +819,8 @@
         fprintf(dotOutFile, "\tn%s -- n%s [color=red];\n", d->shortname, 
second_shortname);
       else if (distance == 4)
         fprintf(dotOutFile, "\tn%s -- n%s [color=green];\n", d->shortname, 
second_shortname);
+      else
+        fprintf(dotOutFile, "\tn%s -- n%s [color=brown];\n", d->shortname, 
second_shortname);
     }
   GNUNET_free(second_shortname);
 }

Modified: gnunet/src/dv/test_transport_dv_data.conf
===================================================================
--- gnunet/src/dv/test_transport_dv_data.conf   2010-06-18 15:55:33 UTC (rev 
11810)
+++ gnunet/src/dv/test_transport_dv_data.conf   2010-06-18 16:11:03 UTC (rev 
11811)
@@ -43,7 +43,7 @@
 
 [dv]
 AUTOSTART = YES
-DEBUG = NO
+DEBUG = YES
 ACCEPT_FROM6 = ::1;
 ACCEPT_FROM = 127.0.0.1;
 BINARY = gnunet-service-dv
@@ -57,7 +57,7 @@
 PORT = 2571
 
 [testing]
-NUM_PEERS = 5
+NUM_PEERS = 10
 DEBUG = YES
 WEAKRANDOM = YES
 TOPOLOGY = CLIQUE




reply via email to

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