[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: use fprintf, change output
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: use fprintf, change output style |
Date: |
Thu, 09 Aug 2018 16:22:35 +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 c1d682ec3 use fprintf, change output style
c1d682ec3 is described below
commit c1d682ec363c5cb4e8fdca5ee9b4dd8eaff29204
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Thu Aug 9 16:22:33 2018 +0200
use fprintf, change output style
---
src/reclaim/gnunet-reclaim.c | 45 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c
index 837b42916..677e9f49f 100644
--- a/src/reclaim/gnunet-reclaim.c
+++ b/src/reclaim/gnunet-reclaim.c
@@ -187,8 +187,8 @@ store_attr_cont (void *cls,
{
reclaim_op = NULL;
if (GNUNET_SYSERR == success) {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "%s\n", emsg);
+ fprintf (stderr,
+ "%s\n", emsg);
}
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
@@ -199,6 +199,8 @@ process_attrs (void *cls,
const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr)
{
char *value_str;
+ const char* attr_type;
+
if (NULL == identity)
{
reclaim_op = NULL;
@@ -213,8 +215,9 @@ process_attrs (void *cls,
value_str = GNUNET_RECLAIM_ATTRIBUTE_value_to_string (attr->type,
attr->data,
attr->data_size);
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- "%s: %s\n", attr->name, value_str);
+ attr_type = GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (attr->type);
+ fprintf (stdout,
+ "%s: %s [%s,v%u]\n", attr->name, value_str, attr_type,
attr->version);
}
@@ -222,8 +225,8 @@ static void
iter_error (void *cls)
{
attr_iterator = NULL;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to iterate over attributes\n");
+ fprintf (stderr,
+ "Failed to iterate over attributes\n");
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
@@ -232,8 +235,8 @@ timeout_task (void *cls)
{
timeout = NULL;
ret = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- "Timeout\n");
+ fprintf (stderr,
+ "Timeout\n");
if (NULL == cleanup_task)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
@@ -244,8 +247,8 @@ process_rvk (void *cls, int success, const char* msg)
reclaim_op = NULL;
if (GNUNET_OK != success)
{
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- "Revocation failed.\n");
+ fprintf (stderr,
+ "Revocation failed.\n");
ret = 1;
}
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
@@ -382,7 +385,7 @@ iter_cb (void *cls,
attr->data_size);
attr_type = GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (attr->type);
fprintf (stdout,
- "%s\t%s\t%u\t%s\n", attr->name, attr_type, attr->version,
attr_str);
+ "%s: %s [%s,v%u]\n", attr->name, attr_str, attr_type,
attr->version);
}
GNUNET_RECLAIM_get_attributes_next (attr_iterator);
}
@@ -392,8 +395,8 @@ start_get_attributes ()
{
if (NULL == pkey)
{
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- "Ego %s not found\n", ego_name);
+ fprintf (stderr,
+ "Ego %s not found\n", ego_name);
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
return;
}
@@ -413,10 +416,6 @@ start_get_attributes ()
&ticket,
sizeof (struct GNUNET_RECLAIM_Ticket));
- if (list)
- fprintf (stdout,
- "Name\tType\tVersion\tValue\n");
-
attr_list = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList);
claim = NULL;
attr_iterator = GNUNET_RECLAIM_get_attributes_start (reclaim_handle,
@@ -462,24 +461,24 @@ run (void *cls,
if (NULL == ego_name)
{
ret = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- _("Ego is required\n"));
+ fprintf (stderr,
+ _("Ego is required\n"));
return;
}
if ( (NULL == attr_value) && (NULL != attr_name) )
{
ret = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- _("Attribute value missing!\n"));
+ fprintf (stderr,
+ _("Attribute value missing!\n"));
return;
}
if ( (NULL == rp) && (NULL != issue_attrs) )
{
ret = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- _("Requesting party key is required!\n"));
+ fprintf (stderr,
+ _("Requesting party key is required!\n"));
return;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: use fprintf, change output style,
gnunet <=