[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -skeleton logic for #6980
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -skeleton logic for #6980 |
Date: |
Fri, 06 Aug 2021 09:28:37 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new c71c40d4 -skeleton logic for #6980
c71c40d4 is described below
commit c71c40d4d62d55730dad032c3ef9f8f645a07efd
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 6 09:28:34 2021 +0200
-skeleton logic for #6980
---
src/exchange/taler-exchange-httpd.c | 24 ++++++++++++++++--------
src/exchange/taler-exchange-httpd_keys.c | 4 ++--
src/exchange/taler-exchange-httpd_keys.h | 4 ++--
src/exchange/taler-exchange-httpd_wire.c | 12 ++++++++++++
src/exchange/taler-exchange-httpd_wire.h | 13 +++++++++++++
5 files changed, 45 insertions(+), 12 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd.c
b/src/exchange/taler-exchange-httpd.c
index 237a0e8e..ca058f0b 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -681,16 +681,24 @@ handle_get_management (const struct TEH_RequestHandler
*rh,
struct MHD_Connection *connection,
const char *const args[1])
{
- if ( (NULL == args[0]) ||
- (0 != strcmp (args[0],
- "keys")) ||
- (NULL != args[1]) )
+ if ( (NULL != args[0]) &&
+ (0 == strcmp (args[0],
+ "keys")) &&
+ (NULL == args[1]) )
{
- GNUNET_break_op (0);
- return r404 (connection, "/management/*");
+ return TEH_keys_management_get_keys_handler (rh,
+ connection);
+ }
+ if ( (NULL != args[0]) &&
+ (0 == strcmp (args[0],
+ "wire")) &&
+ (NULL == args[1]) )
+ {
+ return TEH_wire_management_get_wire_handler (rh,
+ connection);
}
- return TEH_keys_management_get_handler (rh,
- connection);
+ GNUNET_break_op (0);
+ return r404 (connection, "/management/*");
}
diff --git a/src/exchange/taler-exchange-httpd_keys.c
b/src/exchange/taler-exchange-httpd_keys.c
index 0cd61804..da636d34 100644
--- a/src/exchange/taler-exchange-httpd_keys.c
+++ b/src/exchange/taler-exchange-httpd_keys.c
@@ -2481,8 +2481,8 @@ add_future_signkey_cb (void *cls,
MHD_RESULT
-TEH_keys_management_get_handler (const struct TEH_RequestHandler *rh,
- struct MHD_Connection *connection)
+TEH_keys_management_get_keys_handler (const struct TEH_RequestHandler *rh,
+ struct MHD_Connection *connection)
{
struct TEH_KeyStateHandle *ksh;
json_t *reply;
diff --git a/src/exchange/taler-exchange-httpd_keys.h
b/src/exchange/taler-exchange-httpd_keys.h
index 7494597a..8d2aae9d 100644
--- a/src/exchange/taler-exchange-httpd_keys.h
+++ b/src/exchange/taler-exchange-httpd_keys.h
@@ -344,8 +344,8 @@ TEH_keys_get_handler (const struct TEH_RequestHandler *rh,
* @return MHD result code
*/
MHD_RESULT
-TEH_keys_management_get_handler (const struct TEH_RequestHandler *rh,
- struct MHD_Connection *connection);
+TEH_keys_management_get_keys_handler (const struct TEH_RequestHandler *rh,
+ struct MHD_Connection *connection);
/**
diff --git a/src/exchange/taler-exchange-httpd_wire.c
b/src/exchange/taler-exchange-httpd_wire.c
index f919303a..7e4418bd 100644
--- a/src/exchange/taler-exchange-httpd_wire.c
+++ b/src/exchange/taler-exchange-httpd_wire.c
@@ -376,4 +376,16 @@ TEH_handler_wire (const struct TEH_RequestHandler *rh,
}
+MHD_RESULT
+TEH_wire_management_get_wire_handler (const struct TEH_RequestHandler *rh,
+ struct MHD_Connection *connection)
+{
+ return TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ MHD_HTTP_OK,
+ GNUNET_JSON_pack_string ("foo",
+ "bar"));
+}
+
+
/* end of taler-exchange-httpd_wire.c */
diff --git a/src/exchange/taler-exchange-httpd_wire.h
b/src/exchange/taler-exchange-httpd_wire.h
index 75094f5a..4306d89c 100644
--- a/src/exchange/taler-exchange-httpd_wire.h
+++ b/src/exchange/taler-exchange-httpd_wire.h
@@ -42,6 +42,19 @@ void
TEH_WIRE_done (void);
+/**
+ * Function to call to handle requests to GET "/management/wire" by sending
+ * back our current wire status.
+ *
+ * @param rh context of the handler
+ * @param connection the MHD connection to handle
+ * @return MHD result code
+ */
+MHD_RESULT
+TEH_wire_management_get_wire_handler (const struct TEH_RequestHandler *rh,
+ struct MHD_Connection *connection);
+
+
/**
* Something changed in the database. Rebuild the wire replies. This function
* should be called if the exchange learns about a new signature from our
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -skeleton logic for #6980,
gnunet <=