gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: RECLAIM/OIDC: better loggin


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: RECLAIM/OIDC: better logging
Date: Sat, 27 Apr 2019 14:39:06 +0200

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new f55721359 RECLAIM/OIDC: better logging
f55721359 is described below

commit f55721359af11939257a757453130e3887226534
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sat Apr 27 14:38:46 2019 +0200

    RECLAIM/OIDC: better logging
---
 src/reclaim/gnunet-service-reclaim.c         | 11 ++++++++++-
 src/reclaim/gnunet-service-reclaim_tickets.c |  8 ++++----
 src/reclaim/oidc_helper.c                    |  2 +-
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/reclaim/gnunet-service-reclaim.c 
b/src/reclaim/gnunet-service-reclaim.c
index 014d87586..d5aeff8d7 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -551,6 +551,7 @@ send_ticket_result (const struct IdpClient *client,
   }
   // TODO add success member
   irm->id = htonl (r_id);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending TICKET_RESULT message\n");
   GNUNET_MQ_send (client->mq, env);
 }
 
@@ -598,6 +599,7 @@ handle_issue_ticket_message (void *cls, const struct 
IssueTicketMessage *im)
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs;
   size_t attrs_len;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ISSUE_TICKET message\n");
   tio = GNUNET_new (struct TicketIssueOperation);
   attrs_len = ntohs (im->attr_len);
   attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char *)&im[1], 
attrs_len);
@@ -624,6 +626,7 @@ revoke_result_cb (void *cls, int32_t success)
   struct GNUNET_MQ_Envelope *env;
   struct RevokeTicketResultMessage *trm;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending REVOKE_TICKET_RESULT 
message\n");
   rop->rh = NULL;
   env = GNUNET_MQ_msg (trm, GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT);
   trm->id = htonl (rop->r_id);
@@ -656,6 +659,7 @@ handle_revoke_ticket_message (void *cls, const struct 
RevokeTicketMessage *rm)
   struct IdpClient *idp = cls;
   struct GNUNET_RECLAIM_Ticket *ticket;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received REVOKE_TICKET message\n");
   rop = GNUNET_new (struct TicketRevocationOperation);
   ticket = (struct GNUNET_RECLAIM_Ticket *)&rm[1];
   rop->r_id = ntohl (rm->id);
@@ -695,6 +699,7 @@ consume_result_cb (void *cls,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error consuming ticket: %s\n", emsg);
   }
   attrs_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending CONSUME_TICKET_RESULT 
message\n");
   env = GNUNET_MQ_msg_extra (crm,
                              attrs_len,
                              
GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT);
@@ -718,6 +723,7 @@ handle_consume_ticket_message (void *cls, const struct 
ConsumeTicketMessage *cm)
   struct GNUNET_RECLAIM_Ticket *ticket;
   struct IdpClient *idp = cls;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CONSUME_TICKET message\n");
   cop = GNUNET_new (struct ConsumeTicketOperation);
   cop->r_id = ntohl (cm->id);
   cop->client = idp;
@@ -1073,7 +1079,7 @@ handle_attribute_delete_message (void *cls,
   struct AttributeDeleteHandle *adh;
   struct IdpClient *idp = cls;
   size_t data_len;
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received ATTRIBUTE_DELETE message\n");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_DELETE message\n");
 
   data_len = ntohs (dam->attr_len);
 
@@ -1126,6 +1132,7 @@ attr_iter_finished (void *cls)
   struct GNUNET_MQ_Envelope *env;
   struct AttributeResultMessage *arm;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
   env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
   arm->id = htonl (ai->request_id);
   arm->attr_len = htons (0);
@@ -1158,6 +1165,7 @@ attr_iter_cb (void *cls,
     return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", label);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
   env = GNUNET_MQ_msg_extra (arm,
                              rd->data_size,
                              GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
@@ -1267,6 +1275,7 @@ ticket_iter_cb (void *cls, struct GNUNET_RECLAIM_Ticket 
*ticket)
     memcpy (&trm[1], ticket, sizeof (struct GNUNET_RECLAIM_Ticket));
   }
   trm->id = htonl (ti->r_id);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending TICKET_RESULT message\n");
   GNUNET_MQ_send (ti->client->mq, env);
   if (NULL == ticket)
     GNUNET_free (ti);
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c 
b/src/reclaim/gnunet-service-reclaim_tickets.c
index 1cdd4268d..75d9d3940 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/reclaim/gnunet-service-reclaim_tickets.c
@@ -403,7 +403,7 @@ rvk_move_attr_cb (void *cls, const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *zone,
       GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_STRONG, UINT64_MAX);
   new_rd = *rd;
   claim = GNUNET_RECLAIM_ATTRIBUTE_deserialize (rd->data, rd->data_size);
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Attribute to update: Name=%s, ID=%" PRIu64 "\n", claim->name,
               claim->id);
   claim->id = rvk->move_attr->new_id;
@@ -686,7 +686,7 @@ process_parallel_lookup_result (void *cls, uint32_t 
rd_count,
   struct ParallelLookup *parallel_lookup = cls;
   struct RECLAIM_TICKETS_ConsumeHandle *cth = parallel_lookup->handle;
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *attr_le;
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Parallel lookup finished (count=%u)\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parallel lookup finished (count=%u)\n",
               rd_count);
 
   GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head,
@@ -763,7 +763,7 @@ lookup_authz_cb (void *cls, uint32_t rd_count,
     if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR_REF != rd[i].record_type)
       continue;
     lbl = GNUNET_STRINGS_data_to_string_alloc (rd[i].data, rd[i].data_size);
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Attribute ref found %s\n", lbl);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Attribute ref found %s\n", lbl);
     parallel_lookup = GNUNET_new (struct ParallelLookup);
     parallel_lookup->handle = cth;
     parallel_lookup->label = lbl;
@@ -803,7 +803,7 @@ RECLAIM_TICKETS_consume (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *id,
   cth->cb_cls = cb_cls;
   label =
       GNUNET_STRINGS_data_to_string_alloc (&cth->ticket.rnd, sizeof 
(uint64_t));
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Looking for AuthZ info under %s\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking for AuthZ info under %s\n",
               label);
   cth->lookup_start_time = GNUNET_TIME_absolute_get ();
   cth->lookup_request = GNUNET_GNS_lookup (
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index abe7fa623..56a4b17a4 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -419,7 +419,7 @@ OIDC_parse_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPublicKey *audience,
   size_t signature_offset;
   uint32_t nonce = 0;
 
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Trying to decode `%s'", code);
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Trying to decode `%s'\n", code);
   code_payload = NULL;
   code_payload_len =
     GNUNET_STRINGS_base64_decode (code, strlen (code), (void **) 
&code_payload);

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



reply via email to

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