gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: complain better if args are


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: complain better if args are wrong
Date: Tue, 04 Dec 2018 13:09:40 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new c99c00f33 complain better if args are wrong
c99c00f33 is described below

commit c99c00f33921990533b80f26baeea4030b873c80
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Dec 4 13:09:38 2018 +0100

    complain better if args are wrong
---
 src/namestore/gnunet-namestore.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 8386a696d..90fe79779 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -1334,6 +1334,10 @@ run (void *cls,
   (void) cls;
   (void) args;
   (void) cfgfile;
+  if (NULL != args[0])
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+               _("Superfluous command line arguments (starting with `%s') 
ignored\n"),
+               args[0]);
   if ( (NULL != args[0]) &&
        (NULL == uri) )
     uri = GNUNET_strdup (args[0]);
@@ -1395,7 +1399,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   tok = strtok (cp, " ");
   if (NULL == tok)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Empty record line argument is not allowed.\n"));
     GNUNET_free (cp);
     return GNUNET_SYSERR;
@@ -1405,7 +1409,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
                        &etime_is_rel,
                        &record.expiration_time))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Invalid expiration time `%s'\n"),
                tok);
     GNUNET_free (cp);
@@ -1423,7 +1427,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   record.record_type = GNUNET_GNSRECORD_typename_to_number (tok);
   if (UINT32_MAX == record.record_type)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Unknown record type `%s'\n"),
                tok);
     GNUNET_free (cp);
@@ -1432,7 +1436,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   tok = strtok (NULL, " ");
   if (NULL == tok)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Missing entries in record line `%s'.\n"),
                value);
     GNUNET_free (cp);
@@ -1449,7 +1453,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
   tok = strchr (&value[tok - cp], (unsigned char) ' ');
   if (NULL == tok)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Missing entries in record line `%s'.\n"),
                value);
     GNUNET_free (cp);
@@ -1463,7 +1467,7 @@ multirecord_process (struct 
GNUNET_GETOPT_CommandLineProcessorContext *ctx,
                                        &raw_data,
                                        &record.data_size))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                _("Invalid record data for type %s: `%s'.\n"),
                GNUNET_GNSRECORD_number_to_typename (record.record_type),       
        
                tok);

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



reply via email to

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