gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 02/04: fix index


From: gnunet
Subject: [taler-anastasis] 02/04: fix index
Date: Tue, 25 Aug 2020 14:48:52 +0200

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit c463b9b77fd8c8d40c0d45e541bd7739614b8e9f
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sat Aug 22 17:45:57 2020 +0000

    fix index
---
 src/cli/anastasis-cli-splitter.c | 40 ++++++++++++++++++++++++++--------------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index a2cbd85..a7bb8cb 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -840,7 +840,7 @@ read_keyboard_command (void *cls)
             (0 == strcmp ("question", tu_states[i].method)))
         {
           printf ("truth#%u: %s \"%s\" <OMITTED>\n",
-                  i,
+                  tu_states[i].index,
                   tu_states[i].method,
                   tu_states[i].secret_question);
         }
@@ -866,8 +866,10 @@ read_keyboard_command (void *cls)
       char *token = strtok (truth_details, " ");
       if (! token)
       {
-        printf ("Sorry, something went wrong with your command: Server is 
missing.\n");
-        printf ("Example: truth add server#0 question \"question\" 
\"answer\"\n");
+        printf (
+          "Sorry, something went wrong with your command: Server is 
missing.\n");
+        printf (
+          "Example: truth add server#0 question \"question\" \"answer\"\n");
         free (buffer);
         buffer = (char *) NULL;
         keyboard_task = NULL;
@@ -885,8 +887,10 @@ read_keyboard_command (void *cls)
         server_num = (int) token[strlen ("server#")] - 48;
         if (server_num > servers_length)
         {
-          printf ("Sorry, something went wrong with your command: Server 
number is missing.\n");
-          printf ("Example: truth add server#0 question \"question\" 
\"answer\"\n");
+          printf (
+            "Sorry, something went wrong with your command: Server number is 
missing.\n");
+          printf (
+            "Example: truth add server#0 question \"question\" \"answer\"\n");
           free (buffer);
           buffer = (char *) NULL;
           keyboard_task = NULL;
@@ -902,7 +906,8 @@ read_keyboard_command (void *cls)
         token = strtok (NULL, " ");
         if (! token)
         {
-          printf ("Sorry, something went wrong with your command: Method is 
missing.\n");
+          printf (
+            "Sorry, something went wrong with your command: Method is 
missing.\n");
           free (buffer);
           buffer = (char *) NULL;
           keyboard_task = NULL;
@@ -924,8 +929,10 @@ read_keyboard_command (void *cls)
             token = strtok (NULL, "\"");
             if (! token)
             {
-              printf ("Sorry, something went wrong with your command: Question 
is missing.\n");
-              printf ("Example: truth add server#0 question \"question\" 
\"answer\"\n");
+              printf (
+                "Sorry, something went wrong with your command: Question is 
missing.\n");
+              printf (
+                "Example: truth add server#0 question \"question\" 
\"answer\"\n");
               free (buffer);
               buffer = (char *) NULL;
               keyboard_task = NULL;
@@ -944,8 +951,10 @@ read_keyboard_command (void *cls)
             token = strtok (NULL, "\"");
             if (! token)
             {
-              printf ("Sorry, something went wrong with your command: Answer 
is missing.\n");
-              printf ("Example: truth add server#0 question \"question\" 
\"answer\"\n");
+              printf (
+                "Sorry, something went wrong with your command: Answer is 
missing.\n");
+              printf (
+                "Example: truth add server#0 question \"question\" 
\"answer\"\n");
               free (buffer);
               buffer = (char *) NULL;
               keyboard_task = NULL;
@@ -979,8 +988,8 @@ read_keyboard_command (void *cls)
           else
           {
             printf ("Sorry, server#%u does not support '%s'\n",
-                  server_num,
-                  tus->method);
+                    server_num,
+                    tus->method);
             free (buffer);
             buffer = (char *) NULL;
             keyboard_task = NULL;
@@ -1044,8 +1053,10 @@ read_keyboard_command (void *cls)
       }
       else
       {
-        printf ("Sorry, something went wrong with your command: Server is not 
correct.\n");
-        printf ("Example: truth add server#0 question \"question\" 
\"answer\"\n");
+        printf (
+          "Sorry, something went wrong with your command: Server is not 
correct.\n");
+        printf (
+          "Example: truth add server#0 question \"question\" \"answer\"\n");
         free (buffer);
         buffer = (char *) NULL;
         keyboard_task = NULL;
@@ -1128,6 +1139,7 @@ read_keyboard_command (void *cls)
                     strlen ("policy add")))
   {
     struct PolicyCreateState *pcs = GNUNET_new (struct PolicyCreateState);
+    pcs->tu_states_len = 0;
     char *token_start = &buffer[strlen ("policy add ")];
     char *token = strtok (token_start, " ");
     while (token != NULL)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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