[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: worked on splitter
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: worked on splitter |
Date: |
Mon, 18 May 2020 09:45:40 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 3275a95 worked on splitter
3275a95 is described below
commit 3275a95521935789bc53221234eb46ecc64052c4
Author: Dennis Neufeld <address@hidden>
AuthorDate: Mon May 18 07:45:37 2020 +0000
worked on splitter
---
src/cli/anastasis-cli-splitter.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index a738f21..0a415ee 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -37,7 +37,7 @@ struct TruthUploadState
/**
* URL of the anastasis backend.
*/
- const char *backend_url;
+ char *backend_url;
/**
* label of the anastasis backend.
@@ -327,8 +327,11 @@ read_keyboard_command (void *cls)
i,
tu_states[i].backend_url,
tu_states[i].backend_methods,
+ "test_insurance", // FIXME
+ "test_cost" // FIXME
+ /* FIXME
TALER_amount_to_string (tu_states[i].backend_insurance),
- TALER_amount_to_string (tu_states[i].backend_cost));
+ TALER_amount_to_string (tu_states[i].backend_cost)*/);
}
}
else
@@ -346,10 +349,14 @@ read_keyboard_command (void *cls)
// FIXME "server add" logic here
struct TruthUploadState tus;
struct SaltState *ss;
+ size_t url_len = characters - strlen ("server add ") - sizeof (char);
ss = GNUNET_new (struct SaltState);
- const char *url = &buffer[strlen ("server add ")];
- tus.backend_url = url;
+ char *url_delim = &buffer[strlen ("server add ")];
+ tus.backend_url = GNUNET_malloc (url_len);
+ strncpy (tus.backend_url,
+ url_delim,
+ url_len);
ss->anastasis_url = tus.backend_url;
ss->http_status = MHD_HTTP_OK;
ss->so = ANASTASIS_salt (ctx,
@@ -361,6 +368,7 @@ read_keyboard_command (void *cls)
GNUNET_break (0);
return;
}
+
tus.backend_salt = &ss->salt;
// FIXME /terms request here, DELETE next 3 lines!
@@ -387,17 +395,20 @@ read_keyboard_command (void *cls)
{
for (unsigned int i = 0; i < tu_states_length; i++)
{
- if (0 == strcmp ("SMS", tu_states[i].method))
- printf ("truth#%u: %s %s\n",
- i,
- tu_states[i].method,
- tu_states[i].phone);
- if (0 == strcmp ("Secure-Question", tu_states[i].method))
+ if (NULL != tu_states[i].truth)
{
- printf ("truth#%u: %s \"%s\" <OMITTED>\n",
- i,
- tu_states[i].method,
- tu_states[i].secret_question);
+ if (0 == strcmp ("SMS", tu_states[i].method))
+ printf ("truth#%u: %s %s\n",
+ i,
+ tu_states[i].method,
+ tu_states[i].phone);
+ if (0 == strcmp ("Secure-Question", tu_states[i].method))
+ {
+ printf ("truth#%u: %s \"%s\" <OMITTED>\n",
+ i,
+ tu_states[i].method,
+ tu_states[i].secret_question);
+ }
}
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-anastasis] branch master updated: worked on splitter,
gnunet <=