gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (b7002d3f8 -> b92a2992b)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (b7002d3f8 -> b92a2992b)
Date: Fri, 24 Feb 2017 22:52:09 +0100

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

tg pushed a change to branch master
in repository gnunet.

    from b7002d3f8 Merge branch 'master' of gnunet.org:gnunet
     new e5c0f2652 util: logging
     new b92a2992b multicast: logging, test fix

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/multicast/Makefile.am                |  2 +-
 src/multicast/gnunet-service-multicast.c | 19 ++++++++++++++-----
 src/multicast/test_multicast.c           |  9 +++++++++
 src/util/mq.c                            |  2 +-
 src/util/server.c                        | 10 +++++-----
 src/util/service_new.c                   |  9 +++++++++
 6 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/src/multicast/Makefile.am b/src/multicast/Makefile.am
index bac856b00..61821d973 100644
--- a/src/multicast/Makefile.am
+++ b/src/multicast/Makefile.am
@@ -55,7 +55,7 @@ check_PROGRAMS = \
  test_multicast_multipeer
 
 if ENABLE_TEST_RUN
-AM_TESTS_ENVIRONMENT=export 
GNUNET_PREFIX=$${GNUNET_PREFIX:address@hidden@};export 
PATH=$${GNUNET_PREFIX:address@hidden@}/bin:$$PATH;unset XDG_DATA_HOME;unset 
XDG_CONFIG_HOME;
+AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:address@hidden@}; 
export PATH=$${GNUNET_PREFIX:address@hidden@}/bin:$$PATH; unset XDG_DATA_HOME; 
unset XDG_CONFIG_HOME; export GNUNET_FORCE_LOG=';;;;INFO'
 TESTS = $(check_PROGRAMS)
 endif
 
diff --git a/src/multicast/gnunet-service-multicast.c 
b/src/multicast/gnunet-service-multicast.c
index 554962d99..d8a9c8f93 100644
--- a/src/multicast/gnunet-service-multicast.c
+++ b/src/multicast/gnunet-service-multicast.c
@@ -674,6 +674,9 @@ client_send_origin (struct GNUNET_HashCode *pub_key_hash,
 static void
 client_send_ack (struct GNUNET_HashCode *pub_key_hash)
 {
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Sending message ACK to client.\n");
+
   static struct GNUNET_MessageHeader *msg = NULL;
   if (NULL == msg)
   {
@@ -713,6 +716,9 @@ cadet_send_channel (struct Channel *chn, const struct 
GNUNET_MessageHeader *msg)
   else
   {
     chn->msgs_pending++;
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "%p Queuing message. Pending messages: %u\n",
+                chn, chn->msgs_pending);
   }
 }
 
@@ -859,6 +865,11 @@ cadet_notify_window_change (void *cls,
                             int window_size)
 {
   struct Channel *chn = cls;
+
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "%p Window size changed to %d.  Pending messages: %u\n",
+              chn, window_size, chn->msgs_pending);
+
   chn->is_connected = GNUNET_YES;
   chn->window_size = (int32_t) window_size;
 
@@ -867,7 +878,7 @@ cadet_notify_window_change (void *cls,
     if (0 < chn->msgs_pending)
     {
       client_send_ack (&chn->group_pub_hash);
-      --chn->msgs_pending;
+      chn->msgs_pending--;
     }
     else
     {
@@ -1680,10 +1691,8 @@ handle_client_multicast_message (void *cls,
   }
 
   client_send_all (&grp->pub_key_hash, &out->header);
-  if (0 == cadet_send_children (&grp->pub_key_hash, &out->header))
-  {
-    client_send_ack (&grp->pub_key_hash);
-  }
+  cadet_send_children (&grp->pub_key_hash, &out->header);
+  client_send_ack (&grp->pub_key_hash);
   GNUNET_free (out);
 
   GNUNET_SERVICE_client_continue (client);
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c
index 1e3a4922b..7e9b51e23 100644
--- a/src/multicast/test_multicast.c
+++ b/src/multicast/test_multicast.c
@@ -484,6 +484,10 @@ member_recv_message (void *cls,
 
   switch (test)
   {
+  case TEST_ORIGIN_TO_ALL:
+    test = TEST_ORIGIN_TO_ALL_RECV;
+    break;
+
   case TEST_ORIGIN_TO_ALL_RECV:
     // Test 6 starts here
     member_to_origin ();
@@ -523,6 +527,11 @@ origin_recv_message (void *cls,
     test = TEST_ORIGIN_TO_ALL_RECV;
     break;
 
+  case TEST_ORIGIN_TO_ALL_RECV:
+    // Test 6 starts here
+    member_to_origin ();
+    break;
+
   default:
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Invalid test #%d in origin_recv_message()\n", test);
diff --git a/src/util/mq.c b/src/util/mq.c
index 71619bda4..79e2d0455 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -764,7 +764,7 @@ server_client_send_impl (struct GNUNET_MQ_Handle *mq,
   GNUNET_assert (NULL != mq);
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Transmitting message of type %u and size %u\n",
+       "Sending message of type %u and size %u\n",
        ntohs (msg->type), ntohs (msg->size));
 
   struct ServerClientSocketState *state = impl_state;
diff --git a/src/util/server.c b/src/util/server.c
index d7da5c6c0..83c30e328 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -945,9 +945,9 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
 
   type = ntohs (message->type);
   size = ntohs (message->size);
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Server schedules transmission of %u-byte message of type %u to 
client.\n",
-       size, type);
+  LOG (GNUNET_ERROR_TYPE_INFO,
+       "Received message of type %u and size %u from client\n",
+       type, size);
   found = GNUNET_NO;
   for (pos = server->handlers; NULL != pos; pos = pos->next)
   {
@@ -1240,8 +1240,8 @@ client_message_tokenizer_callback (void *cls,
   int ret;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Tokenizer gives server message of type %u from client\n",
-       ntohs (message->type));
+       "Tokenizer gives server message of type %u and size %u from client\n",
+       ntohs (message->type), ntohs (message->size));
   sender->in_process_client_buffer = GNUNET_YES;
   ret = GNUNET_SERVER_inject (server, sender, message);
   sender->in_process_client_buffer = GNUNET_NO;
diff --git a/src/util/service_new.c b/src/util/service_new.c
index 987fb1c3b..8371f7703 100644
--- a/src/util/service_new.c
+++ b/src/util/service_new.c
@@ -1999,6 +1999,11 @@ service_mq_send (struct GNUNET_MQ_Handle *mq,
   if (NULL != client->drop_task)
     return; /* we're going down right now, do not try to send */
   GNUNET_assert (NULL == client->send_task);
+
+  LOG (GNUNET_ERROR_TYPE_INFO,
+       "Sending message of type %u and size %u to client\n",
+       ntohs (msg->type), ntohs (msg->size));
+
   client->msg = msg;
   client->msg_pos = 0;
   client->send_task
@@ -2097,6 +2102,10 @@ service_client_mst_cb (void *cls,
 {
   struct GNUNET_SERVICE_Client *client = cls;
 
+  LOG (GNUNET_ERROR_TYPE_INFO,
+       "Received message of type %u and size %u from client\n",
+       ntohs (message->type), ntohs (message->size));
+
   GNUNET_assert (GNUNET_NO == client->needs_continue);
   client->needs_continue = GNUNET_YES;
   client->warn_type = ntohs (message->type);

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



reply via email to

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