aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-27 14:38:46 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-27 14:38:46 +0200
commitf55721359af11939257a757453130e3887226534 (patch)
tree11ee7bab5bd81b745143444409727fa50314501f /src/reclaim/gnunet-service-reclaim.c
parentc17d94f2c43df8fcfb3dd75ea7157eb43fa59c33 (diff)
downloadgnunet-f55721359af11939257a757453130e3887226534.tar.gz
gnunet-f55721359af11939257a757453130e3887226534.zip
RECLAIM/OIDC: better logging
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c11
1 files changed, 10 insertions, 1 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,
551 } 551 }
552 // TODO add success member 552 // TODO add success member
553 irm->id = htonl (r_id); 553 irm->id = htonl (r_id);
554 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending TICKET_RESULT message\n");
554 GNUNET_MQ_send (client->mq, env); 555 GNUNET_MQ_send (client->mq, env);
555} 556}
556 557
@@ -598,6 +599,7 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im)
598 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs; 599 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs;
599 size_t attrs_len; 600 size_t attrs_len;
600 601
602 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ISSUE_TICKET message\n");
601 tio = GNUNET_new (struct TicketIssueOperation); 603 tio = GNUNET_new (struct TicketIssueOperation);
602 attrs_len = ntohs (im->attr_len); 604 attrs_len = ntohs (im->attr_len);
603 attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char *)&im[1], attrs_len); 605 attrs = GNUNET_RECLAIM_ATTRIBUTE_list_deserialize ((char *)&im[1], attrs_len);
@@ -624,6 +626,7 @@ revoke_result_cb (void *cls, int32_t success)
624 struct GNUNET_MQ_Envelope *env; 626 struct GNUNET_MQ_Envelope *env;
625 struct RevokeTicketResultMessage *trm; 627 struct RevokeTicketResultMessage *trm;
626 628
629 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending REVOKE_TICKET_RESULT message\n");
627 rop->rh = NULL; 630 rop->rh = NULL;
628 env = GNUNET_MQ_msg (trm, GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT); 631 env = GNUNET_MQ_msg (trm, GNUNET_MESSAGE_TYPE_RECLAIM_REVOKE_TICKET_RESULT);
629 trm->id = htonl (rop->r_id); 632 trm->id = htonl (rop->r_id);
@@ -656,6 +659,7 @@ handle_revoke_ticket_message (void *cls, const struct RevokeTicketMessage *rm)
656 struct IdpClient *idp = cls; 659 struct IdpClient *idp = cls;
657 struct GNUNET_RECLAIM_Ticket *ticket; 660 struct GNUNET_RECLAIM_Ticket *ticket;
658 661
662 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received REVOKE_TICKET message\n");
659 rop = GNUNET_new (struct TicketRevocationOperation); 663 rop = GNUNET_new (struct TicketRevocationOperation);
660 ticket = (struct GNUNET_RECLAIM_Ticket *)&rm[1]; 664 ticket = (struct GNUNET_RECLAIM_Ticket *)&rm[1];
661 rop->r_id = ntohl (rm->id); 665 rop->r_id = ntohl (rm->id);
@@ -695,6 +699,7 @@ consume_result_cb (void *cls,
695 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error consuming ticket: %s\n", emsg); 699 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Error consuming ticket: %s\n", emsg);
696 } 700 }
697 attrs_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs); 701 attrs_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs);
702 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending CONSUME_TICKET_RESULT message\n");
698 env = GNUNET_MQ_msg_extra (crm, 703 env = GNUNET_MQ_msg_extra (crm,
699 attrs_len, 704 attrs_len,
700 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT); 705 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT);
@@ -718,6 +723,7 @@ handle_consume_ticket_message (void *cls, const struct ConsumeTicketMessage *cm)
718 struct GNUNET_RECLAIM_Ticket *ticket; 723 struct GNUNET_RECLAIM_Ticket *ticket;
719 struct IdpClient *idp = cls; 724 struct IdpClient *idp = cls;
720 725
726 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CONSUME_TICKET message\n");
721 cop = GNUNET_new (struct ConsumeTicketOperation); 727 cop = GNUNET_new (struct ConsumeTicketOperation);
722 cop->r_id = ntohl (cm->id); 728 cop->r_id = ntohl (cm->id);
723 cop->client = idp; 729 cop->client = idp;
@@ -1073,7 +1079,7 @@ handle_attribute_delete_message (void *cls,
1073 struct AttributeDeleteHandle *adh; 1079 struct AttributeDeleteHandle *adh;
1074 struct IdpClient *idp = cls; 1080 struct IdpClient *idp = cls;
1075 size_t data_len; 1081 size_t data_len;
1076 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received ATTRIBUTE_DELETE message\n"); 1082 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_DELETE message\n");
1077 1083
1078 data_len = ntohs (dam->attr_len); 1084 data_len = ntohs (dam->attr_len);
1079 1085
@@ -1126,6 +1132,7 @@ attr_iter_finished (void *cls)
1126 struct GNUNET_MQ_Envelope *env; 1132 struct GNUNET_MQ_Envelope *env;
1127 struct AttributeResultMessage *arm; 1133 struct AttributeResultMessage *arm;
1128 1134
1135 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
1129 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); 1136 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
1130 arm->id = htonl (ai->request_id); 1137 arm->id = htonl (ai->request_id);
1131 arm->attr_len = htons (0); 1138 arm->attr_len = htons (0);
@@ -1158,6 +1165,7 @@ attr_iter_cb (void *cls,
1158 return; 1165 return;
1159 } 1166 }
1160 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", label); 1167 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", label);
1168 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
1161 env = GNUNET_MQ_msg_extra (arm, 1169 env = GNUNET_MQ_msg_extra (arm,
1162 rd->data_size, 1170 rd->data_size,
1163 GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); 1171 GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
@@ -1267,6 +1275,7 @@ ticket_iter_cb (void *cls, struct GNUNET_RECLAIM_Ticket *ticket)
1267 memcpy (&trm[1], ticket, sizeof (struct GNUNET_RECLAIM_Ticket)); 1275 memcpy (&trm[1], ticket, sizeof (struct GNUNET_RECLAIM_Ticket));
1268 } 1276 }
1269 trm->id = htonl (ti->r_id); 1277 trm->id = htonl (ti->r_id);
1278 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending TICKET_RESULT message\n");
1270 GNUNET_MQ_send (ti->client->mq, env); 1279 GNUNET_MQ_send (ti->client->mq, env);
1271 if (NULL == ticket) 1280 if (NULL == ticket)
1272 GNUNET_free (ti); 1281 GNUNET_free (ti);