gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (360d7afad -> 3902d240e)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (360d7afad -> 3902d240e)
Date: Sun, 19 Feb 2017 20:31:14 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from 360d7afad fix zombie-fest
     new 8802f213c misc logging, no semantic changes
     new 3902d240e mostly logging, avoid having more than one typemap in 
transmission queue, accept port=0 as not an error, tolerate link-local addrs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/cadet/gnunet-service-cadet-new_tunnels.c       |  4 +
 src/core/gnunet-service-core.c                     | 11 ++-
 src/core/gnunet-service-core_kx.c                  | 23 ++++--
 src/core/gnunet-service-core_sessions.c            | 96 ++++++++++++++++++----
 src/core/gnunet-service-core_typemap.c             | 21 ++---
 .../gnunet-service-scalarproduct-ecc_alice.c       | 17 ++++
 .../gnunet-service-scalarproduct-ecc_bob.c         | 20 ++++-
 src/set/set_api.c                                  | 20 +++--
 src/transport/plugin_transport_udp.c               | 15 +---
 src/transport/transport_api_core.c                 |  3 +-
 10 files changed, 176 insertions(+), 54 deletions(-)

diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c 
b/src/cadet/gnunet-service-cadet-new_tunnels.c
index 26983d465..f4772a16c 100644
--- a/src/cadet/gnunet-service-cadet-new_tunnels.c
+++ b/src/cadet/gnunet-service-cadet-new_tunnels.c
@@ -2576,6 +2576,10 @@ GCT_consider_path (struct CadetTunnel *t,
                    struct CadetPeerPath *p,
                    unsigned int off)
 {
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Considering %s for %s\n",
+       GCPP_2s (p),
+       GCT_2s (t));
   (void) consider_path_cb (t,
                            p,
                            off);
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index b0d7b24ba..52c6f72ab 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -696,6 +696,11 @@ GSC_CLIENTS_notify_client_about_neighbour (struct 
GSC_Client *client,
   new_match = GSC_TYPEMAP_test_match (tmap_new,
                                      client->types,
                                      client->tcnt);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Notifying client about neighbour %s (%d/%d)\n",
+              GNUNET_i2s (neighbour),
+              old_match,
+              new_match);
   if (old_match == new_match)
   {
     GNUNET_assert (old_match ==
@@ -720,7 +725,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct 
GSC_Client *client,
                         GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
     cnm->reserved = htonl (0);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Sending NOTIFY_CONNECT message to client.\n");
+                "Sending NOTIFY_CONNECT message about peer %s to client.\n",
+                GNUNET_i2s (neighbour));
     cnm->peer = *neighbour;
     GNUNET_MQ_send (client->mq,
                    env);
@@ -740,6 +746,9 @@ GSC_CLIENTS_notify_client_about_neighbour (struct 
GSC_Client *client,
     env = GNUNET_MQ_msg (dcm,
                         GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT);
     dcm->reserved = htonl (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Sending NOTIFY_DISCONNECT message about peer %s to client.\n",
+                GNUNET_i2s (neighbour));
     dcm->peer = *neighbour;
     GNUNET_MQ_send (client->mq,
                    env);
diff --git a/src/core/gnunet-service-core_kx.c 
b/src/core/gnunet-service-core_kx.c
index 6743ce215..a0c343737 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -261,7 +261,7 @@ struct GSC_KeyExchangeInfo
    * Message queue for sending messages to @a peer.
    */
   struct GNUNET_MQ_Handle *mq;
-  
+
   /**
    * PING message we transmit to the other peer.
    */
@@ -777,7 +777,7 @@ handle_transport_notify_disconnect (void *cls,
                                    void *handler_cls)
 {
   struct GSC_KeyExchangeInfo *kx = handler_cls;
-  
+
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Peer `%s' disconnected from us.\n",
               GNUNET_i2s (peer));
@@ -814,7 +814,7 @@ static void
 send_ping (struct GSC_KeyExchangeInfo *kx)
 {
   struct GNUNET_MQ_Envelope *env;
-  
+
   GNUNET_STATISTICS_update (GSC_stats,
                             gettext_noop ("# PING messages transmitted"),
                             1,
@@ -1332,7 +1332,7 @@ static void
 send_key (struct GSC_KeyExchangeInfo *kx)
 {
   struct GNUNET_MQ_Envelope *env;
-  
+
   GNUNET_assert (GNUNET_CORE_KX_STATE_DOWN != kx->status);
   if (NULL != kx->retry_set_key_task)
   {
@@ -1520,7 +1520,7 @@ handle_encrypted (void *cls,
                    sizeof (struct GNUNET_HashCode)))
   {
     /* checksum failed */
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                "Failed checksum validation for a message from `%s'\n",
                GNUNET_i2s (kx->peer));
     return;
@@ -1536,7 +1536,10 @@ handle_encrypted (void *cls,
                   &m->sequence_number,
                   &buf[ENCRYPTED_HEADER_SIZE],
                   size - ENCRYPTED_HEADER_SIZE))
+  {
+    GNUNET_break_op (0);
     return;
+  }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Decrypted %u bytes from %s\n",
               (unsigned int) (size - ENCRYPTED_HEADER_SIZE),
@@ -1642,7 +1645,7 @@ handle_transport_notify_excess_bw (void *cls,
                                    const struct GNUNET_PeerIdentity *pid,
                                   void *connect_cls)
 {
-  struct GSC_KeyExchangeInfo *kx = connect_cls;  
+  struct GSC_KeyExchangeInfo *kx = connect_cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Peer %s has excess bandwidth available\n",
@@ -1668,6 +1671,10 @@ deliver_message (void *cls,
 {
   struct DeliverMessageContext *dmc = client;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Decrypted message of type %d from %s\n",
+              ntohs (m->type),
+              GNUNET_i2s (dmc->peer));
   if (GNUNET_CORE_KX_STATE_UP != dmc->kx->status)
   {
     GNUNET_STATISTICS_update (GSC_stats,
@@ -1824,7 +1831,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk)
                                              NULL);
   mst = GNUNET_SERVER_mst_create (&deliver_message,
                                  NULL);
-  transport 
+  transport
     = GNUNET_TRANSPORT_core_connect (GSC_cfg,
                                     &GSC_my_identity,
                                     handlers,
@@ -1927,7 +1934,7 @@ GSC_KX_handle_client_monitor_peers (struct 
GNUNET_MQ_Handle *mq)
   {
     struct GNUNET_MQ_Envelope *env;
     struct MonitorNotifyMessage *msg;
-    
+
     env = GNUNET_MQ_msg (msg,
                         GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY);
     msg->state = htonl ((uint32_t) kx->status);
diff --git a/src/core/gnunet-service-core_sessions.c 
b/src/core/gnunet-service-core_sessions.c
index 6687b4819..034f2e883 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -57,6 +57,21 @@ struct SessionMessageEntry
   struct SessionMessageEntry *prev;
 
   /**
+   * How important is this message.
+   */
+  enum GNUNET_CORE_Priority priority;
+
+  /**
+   * Flag set to #GNUNET_YES if this is a typemap message.
+   */
+  int is_typemap;
+
+  /**
+   * Flag set to #GNUNET_YES if this is a typemap confirmation message.
+   */
+  int is_typemap_confirm;
+
+  /**
    * Deadline for transmission, 1s after we received it (if we
    * are not corking), otherwise "now".  Note that this message
    * does NOT expire past its deadline.
@@ -70,11 +85,6 @@ struct SessionMessageEntry
    */
   size_t size;
 
-  /**
-   * How important is this message.
-   */
-  enum GNUNET_CORE_Priority priority;
-
 };
 
 
@@ -275,14 +285,19 @@ transmit_typemap_task (void *cls)
   struct GNUNET_MessageHeader *hdr;
   struct GNUNET_TIME_Relative delay;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Sending TYPEMAP to %s\n",
+              GNUNET_i2s (session->peer));
   session->typemap_delay = GNUNET_TIME_STD_BACKOFF (session->typemap_delay);
   delay = session->typemap_delay;
   /* randomize a bit to avoid spont. sync */
   delay.rel_value_us +=
-      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000 * 1000);
+      GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+                                1000 * 1000);
   session->typemap_task =
       GNUNET_SCHEDULER_add_delayed (delay,
-                                    &transmit_typemap_task, session);
+                                    &transmit_typemap_task,
+                                    session);
   GNUNET_STATISTICS_update (GSC_stats,
                             gettext_noop ("# type map refreshes sent"),
                             1,
@@ -326,7 +341,7 @@ GSC_SESSIONS_create (const struct GNUNET_PeerIdentity *peer,
   struct Session *session;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Creating session for peer `%4s'\n",
+              "Creating session for peer `%s'\n",
               GNUNET_i2s (peer));
   session = GNUNET_new (struct Session);
   session->tmap = GSC_TYPEMAP_create ();
@@ -406,8 +421,14 @@ GSC_SESSIONS_confirm_typemap (const struct 
GNUNET_PeerIdentity *peer,
                               gettext_noop
                               ("# outdated typemap confirmations received"),
                               1, GNUNET_NO);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Got outdated typemap confirmated from peer `%s'\n",
+                GNUNET_i2s (session->peer));
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Got typemap confirmation from peer `%s'\n",
+              GNUNET_i2s (session->peer));
   if (NULL != session->typemap_task)
   {
     GNUNET_SCHEDULER_cancel (session->typemap_task);
@@ -502,9 +523,9 @@ GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest 
*car)
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received client transmission request. queueing\n");
-  GNUNET_CONTAINER_DLL_insert (session->active_client_request_head,
-                               session->active_client_request_tail,
-                               car);
+  GNUNET_CONTAINER_DLL_insert_tail (session->active_client_request_head,
+                                    session->active_client_request_tail,
+                                    car);
   try_transmission (session);
 }
 
@@ -751,7 +772,15 @@ try_transmission (struct Session *session)
     while ( (NULL != (pos = session->sme_head)) &&
             (used + pos->size <= msize) )
     {
-      GNUNET_memcpy (&pbuf[used], &pos[1], pos->size);
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Adding message of type %d (%d/%d) to payload for %s\n",
+                  ntohs (((const struct GNUNET_MessageHeader *)&pos[1])->type),
+                  pos->is_typemap,
+                  pos->is_typemap_confirm,
+                  GNUNET_i2s (session->peer));
+      GNUNET_memcpy (&pbuf[used],
+                     &pos[1],
+                     pos->size);
       used += pos->size;
       GNUNET_CONTAINER_DLL_remove (session->sme_head,
                                    session->sme_tail,
@@ -799,8 +828,23 @@ do_restart_typemap_message (void *cls,
   struct SessionMessageEntry *sme;
   uint16_t size;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Restarting sending TYPEMAP to %s\n",
+              GNUNET_i2s (session->peer));
   size = ntohs (hdr->size);
+  for (sme = session->sme_head; NULL != sme; sme = sme->next)
+  {
+    if (GNUNET_YES == sme->is_typemap)
+    {
+      GNUNET_CONTAINER_DLL_remove (session->sme_head,
+                                   session->sme_tail,
+                                   sme);
+      GNUNET_free (sme);
+      break;
+    }
+  }
   sme = GNUNET_malloc (sizeof (struct SessionMessageEntry) + size);
+  sme->is_typemap = GNUNET_YES;
   GNUNET_memcpy (&sme[1],
                 hdr,
                 size);
@@ -924,18 +968,36 @@ GSC_SESSIONS_set_typemap (const struct 
GNUNET_PeerIdentity *peer,
 
   nmap = GSC_TYPEMAP_get_from_message (msg);
   if (NULL == nmap)
+  {
+    GNUNET_break_op (0);
     return;                     /* malformed */
+  }
   session = find_session (peer);
   if (NULL == session)
   {
     GNUNET_break (0);
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received TYPEMAP from %s\n",
+              GNUNET_i2s (session->peer));
+  for (sme = session->sme_head; NULL != sme; sme = sme->next)
+  {
+    if (GNUNET_YES == sme->is_typemap_confirm)
+    {
+      GNUNET_CONTAINER_DLL_remove (session->sme_head,
+                                   session->sme_tail,
+                                   sme);
+      GNUNET_free (sme);
+      break;
+    }
+  }
   sme = GNUNET_malloc (sizeof (struct SessionMessageEntry) +
                        sizeof (struct TypeMapConfirmationMessage));
   sme->deadline = GNUNET_TIME_absolute_get ();
   sme->size = sizeof (struct TypeMapConfirmationMessage);
   sme->priority = GNUNET_CORE_PRIO_CRITICAL_CONTROL;
+  sme->is_typemap_confirm = GNUNET_YES;
   tmc = (struct TypeMapConfirmationMessage *) &sme[1];
   tmc->header.size = htons (sizeof (struct TypeMapConfirmationMessage));
   tmc->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_CONFIRM_TYPE_MAP);
@@ -975,11 +1037,15 @@ GSC_SESSIONS_add_to_typemap (const struct 
GNUNET_PeerIdentity *peer,
     return;
   session = find_session (peer);
   GNUNET_assert (NULL != session);
-  if (GNUNET_YES == GSC_TYPEMAP_test_match (session->tmap, &type, 1))
+  if (GNUNET_YES == GSC_TYPEMAP_test_match (session->tmap,
+                                            &type, 1))
     return;                     /* already in it */
-  nmap = GSC_TYPEMAP_extend (session->tmap, &type, 1);
+  nmap = GSC_TYPEMAP_extend (session->tmap,
+                             &type,
+                             1);
   GSC_CLIENTS_notify_clients_about_neighbour (peer,
-                                              session->tmap, nmap);
+                                              session->tmap,
+                                              nmap);
   GSC_TYPEMAP_destroy (session->tmap);
   session->tmap = nmap;
 }
diff --git a/src/core/gnunet-service-core_typemap.c 
b/src/core/gnunet-service-core_typemap.c
index d400c0b8b..0600f59ef 100644
--- a/src/core/gnunet-service-core_typemap.c
+++ b/src/core/gnunet-service-core_typemap.c
@@ -177,8 +177,10 @@ GSC_TYPEMAP_get_from_message (const struct 
GNUNET_MessageHeader *msg)
     GNUNET_memcpy (ret, &msg[1], sizeof (struct GSC_TypeMap));
     return ret;
   case GNUNET_MESSAGE_TYPE_CORE_COMPRESSED_TYPE_MAP:
-    GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# type maps received"),
-                              1, GNUNET_NO);
+    GNUNET_STATISTICS_update (GSC_stats,
+                              gettext_noop ("# type maps received"),
+                              1,
+                              GNUNET_NO);
     ret = GNUNET_new (struct GSC_TypeMap);
     dlen = sizeof (struct GSC_TypeMap);
     if ((Z_OK !=
@@ -207,7 +209,8 @@ broadcast_my_type_map ()
 
   hdr = GSC_TYPEMAP_compute_type_map_message ();
   GNUNET_STATISTICS_update (GSC_stats,
-                            gettext_noop ("# updates to my type map"), 1,
+                            gettext_noop ("# updates to my type map"),
+                            1,
                             GNUNET_NO);
   GSC_SESSIONS_broadcast_typemap (hdr);
   GNUNET_free (hdr);
@@ -238,6 +241,8 @@ GSC_TYPEMAP_add (const uint16_t *types,
   }
   if (GNUNET_YES == changed)
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Typemap changed, broadcasting!\n");
     rehash_typemap ();
     broadcast_my_type_map ();
   }
@@ -254,11 +259,10 @@ void
 GSC_TYPEMAP_remove (const uint16_t *types,
                     unsigned int tlen)
 {
-  unsigned int i;
   int changed;
 
   changed = GNUNET_NO;
-  for (i = 0; i < tlen; i++)
+  for (unsigned int i = 0; i < tlen; i++)
   {
     if (0 == --map_counters[types[i]])
     {
@@ -288,13 +292,11 @@ GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap,
                         const uint16_t *types,
                         unsigned int tcnt)
 {
-  unsigned int i;
-
   if (NULL == tmap)
     return GNUNET_NO;
   if (0 == tcnt)
     return GNUNET_YES;          /* matches all */
-  for (i = 0; i < tcnt; i++)
+  for (unsigned int i = 0; i < tcnt; i++)
     if (0 != (tmap->bits[types[i] / 32] & (1 << (types[i] % 32))))
       return GNUNET_YES;
   return GNUNET_NO;
@@ -315,12 +317,11 @@ GSC_TYPEMAP_extend (const struct GSC_TypeMap *tmap,
                     unsigned int tcnt)
 {
   struct GSC_TypeMap *ret;
-  unsigned int i;
 
   ret = GNUNET_new (struct GSC_TypeMap);
   if (NULL != tmap)
     GNUNET_memcpy (ret, tmap, sizeof (struct GSC_TypeMap));
-  for (i = 0; i < tcnt; i++)
+  for (unsigned int i = 0; i < tcnt; i++)
     ret->bits[types[i] / 32] |= (1 << (types[i] % 32));
   return ret;
 }
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c 
b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
index 79a6c6704..9f8d98657 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
@@ -260,16 +260,22 @@ destroy_service_session (struct AliceServiceSession *s)
   }
   if (NULL != s->intersection_listen)
   {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Set intersection, listen still up!\n");
     GNUNET_SET_listen_cancel (s->intersection_listen);
     s->intersection_listen = NULL;
   }
   if (NULL != s->intersection_op)
   {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Set intersection, op still ongoing!\n");
     GNUNET_SET_operation_cancel (s->intersection_op);
     s->intersection_op = NULL;
   }
   if (NULL != s->intersection_set)
   {
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Set intersection, set still there!\n");
     GNUNET_SET_destroy (s->intersection_set);
     s->intersection_set = NULL;
   }
@@ -769,6 +775,9 @@ cb_intersection_request_alice (void *cls,
 {
   struct AliceServiceSession *s = cls;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received intersection request from %s!\n",
+              GNUNET_i2s (other_peer));
   if (0 != memcmp (other_peer,
                    &s->peer,
                    sizeof (struct GNUNET_PeerIdentity)))
@@ -947,8 +956,12 @@ handle_alice_client_message_multipart (void *cls,
   if (s->total != s->client_received_element_count)
   {
     /* more to come */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Received client multipart data, waiting for more!\n");
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Launching computation\n");
   client_request_complete_alice (s);
 }
 
@@ -1053,8 +1066,12 @@ handle_alice_client_message (void *cls,
   if (s->total != s->client_received_element_count)
   {
     /* wait for multipart msg */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Received partial client request, waiting for more!\n");
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Launching computation\n");
   client_request_complete_alice (s);
 }
 
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c 
b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
index 26468f9e7..7fd69a4ea 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
@@ -699,8 +699,15 @@ handle_alices_computation_request (void *cls,
   struct BobServiceSession *s = cls;
 
   s->session_id = msg->session_id; // ??
-  if (s->client_received_element_count == s->total)
-    start_intersection (s);
+  if (s->client_received_element_count < s->total)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Alice ready, still waiting for Bob client data!\n");
+    return;
+  }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Both ready, launching intersection!\n");
+  start_intersection (s);
 }
 
 
@@ -811,13 +818,19 @@ handle_bob_client_message_multipart (void *cls,
   if (s->total != s->client_received_element_count)
   {
     /* more to come */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Request still partial, waiting for more client data!\n");
     return;
   }
   if (NULL == s->channel)
   {
     /* no Alice waiting for this request, wait for Alice */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Client ready, still waiting for Alice!\n");
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Both ready, launching intersection!\n");
   start_intersection (s);
 }
 
@@ -931,6 +944,9 @@ handle_bob_client_message (void *cls,
     s->used_element_count++;
   }
   GNUNET_SERVICE_client_continue (s->client);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received client request, opening port %s!\n",
+              GNUNET_h2s (&msg->session_key));
   s->port = GNUNET_CADET_open_porT (my_cadet,
                                     &msg->session_key,
                                     &cb_channel_incoming,
diff --git a/src/set/set_api.c b/src/set/set_api.c
index 769be82d2..baeee6da0 100644
--- a/src/set/set_api.c
+++ b/src/set/set_api.c
@@ -297,9 +297,9 @@ check_iter_element (void *cls,
  * @param cls the `struct GNUNET_SET_Handle *`
  * @param mh the message
  */
- static void
- handle_iter_element (void *cls,
-                      const struct GNUNET_SET_IterResponseMessage *msg)
+static void
+handle_iter_element (void *cls,
+                     const struct GNUNET_SET_IterResponseMessage *msg)
 {
   struct GNUNET_SET_Handle *set = cls;
   GNUNET_SET_ElementIterator iter = set->iterator;
@@ -773,6 +773,9 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity 
*other_peer,
   struct GNUNET_SET_OperationHandle *oh;
   struct GNUNET_SET_EvaluateMessage *msg;
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Client prepares set operation (%d)\n",
+       result_mode);
   oh = GNUNET_new (struct GNUNET_SET_OperationHandle);
   oh->result_cb = result_cb;
   oh->result_cls = result_cls;
@@ -1011,6 +1014,9 @@ GNUNET_SET_accept (struct GNUNET_SET_Request *request,
   struct GNUNET_SET_AcceptMessage *msg;
 
   GNUNET_assert (GNUNET_NO == request->accepted);
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Client accepts set operation (%d)\n",
+       result_mode);
   request->accepted = GNUNET_YES;
   mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_ACCEPT);
   msg->accept_reject_id = htonl (request->accept_id);
@@ -1050,14 +1056,18 @@ GNUNET_SET_commit (struct GNUNET_SET_OperationHandle 
*oh,
   }
   if (GNUNET_YES == set->invalid)
     return GNUNET_SYSERR;
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Client commits to SET\n");
   GNUNET_assert (NULL != oh->conclude_mqm);
   oh->set = set;
   GNUNET_CONTAINER_DLL_insert (set->ops_head,
                                set->ops_tail,
                                oh);
-  oh->request_id = GNUNET_MQ_assoc_add (set->mq, oh);
+  oh->request_id = GNUNET_MQ_assoc_add (set->mq,
+                                        oh);
   *oh->request_id_addr = htonl (oh->request_id);
-  GNUNET_MQ_send (set->mq, oh->conclude_mqm);
+  GNUNET_MQ_send (set->mq,
+                  oh->conclude_mqm);
   oh->conclude_mqm = NULL;
   oh->request_id_addr = NULL;
   return GNUNET_OK;
diff --git a/src/transport/plugin_transport_udp.c 
b/src/transport/plugin_transport_udp.c
index fd8493e5f..76132523b 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1271,10 +1271,7 @@ udp_plugin_check_address (void *cls,
 
     v6 = (const struct IPv6UdpAddress *) addr;
     if (IN6_IS_ADDR_LINKLOCAL (&v6->ipv6_addr))
-    {
-      GNUNET_break_op (0);
-      return GNUNET_SYSERR;
-    }
+      return GNUNET_OK; /* plausible, if unlikely... */
     memset (&s6, 0, sizeof (s6));
     s6.sin6_family = AF_INET6;
 #if HAVE_SOCKADDR_IN_SIN_LEN
@@ -1338,10 +1335,7 @@ udp_nat_port_map_callback (void *cls,
       GNUNET_assert (sizeof(struct sockaddr_in) == addrlen);
       i4 = (const struct sockaddr_in *) addr;
       if (0 == ntohs (i4->sin_port))
-      {
-        GNUNET_break (0);
-        return;
-      }
+        return; /* Port = 0 means unmapped, ignore these for UDP. */
       memset (&u4,
               0,
               sizeof(u4));
@@ -1359,10 +1353,7 @@ udp_nat_port_map_callback (void *cls,
       GNUNET_assert (sizeof(struct sockaddr_in6) == addrlen);
       i6 = (const struct sockaddr_in6 *) addr;
       if (0 == ntohs (i6->sin6_port))
-      {
-        GNUNET_break (0);
-        return;
-      }
+        return; /* Port = 0 means unmapped, ignore these for UDP. */
       memset (&u6,
               0,
               sizeof(u6));
diff --git a/src/transport/transport_api_core.c 
b/src/transport/transport_api_core.c
index a693cb889..c99ade92f 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -447,7 +447,8 @@ mq_send_impl (struct GNUNET_MQ_Handle *mq,
   GNUNET_MQ_send (h->mq,
                   n->env);
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Queued message for neighbour `%s'.\n",
+       "Queued message of type %u for neighbour `%s'.\n",
+       ntohs (msg->type),
        GNUNET_i2s (&n->id));
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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