gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated (f7c9de7 -> 229907c)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (f7c9de7 -> 229907c)
Date: Thu, 14 Dec 2017 16:02:28 +0100

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

grothoff pushed a change to branch master
in repository exchange.

    from f7c9de7  remove _admin APIs from libtalerexchange
     new 1897d65  eliminate /admin/add/incoming (fixes #5172)
     new 229907c  implement taler-bank-transfer, fixes #5195

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                     |   2 +-
 doc/Makefile.am                                |   3 +-
 doc/taler-bank-transfer.1                      |  50 +++++
 doc/taler-exchange-reservemod.1                |  41 ----
 doc/taler-exchange.texi                        |  17 +-
 src/bank-lib/Makefile.am                       |  13 ++
 src/bank-lib/taler-bank-transfer.c             | 264 +++++++++++++++++++++++++
 src/exchange-lib/test_exchange_api.c           |   3 +-
 src/exchange-tools/Makefile.am                 |  18 --
 src/exchange-tools/taler-exchange-reservemod.c | 225 ---------------------
 src/exchange/Makefile.am                       |   1 -
 src/exchange/exchange.conf                     |  15 --
 src/exchange/taler-exchange-httpd.c            | 237 ++--------------------
 src/exchange/taler-exchange-httpd_admin.c      | 218 --------------------
 src/exchange/taler-exchange-httpd_admin.h      |  46 -----
 15 files changed, 355 insertions(+), 798 deletions(-)
 create mode 100644 doc/taler-bank-transfer.1
 delete mode 100644 doc/taler-exchange-reservemod.1
 create mode 100644 src/bank-lib/taler-bank-transfer.c
 delete mode 100644 src/exchange-tools/taler-exchange-reservemod.c
 delete mode 100644 src/exchange/taler-exchange-httpd_admin.c
 delete mode 100644 src/exchange/taler-exchange-httpd_admin.h

diff --git a/.gitignore b/.gitignore
index 5f227d1..16a2c2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,7 +50,6 @@ src/exchange-tools/taler-auditor-sign
 src/exchange-tools/taler-exchange-dbinit
 src/exchange-tools/taler-exchange-keycheck
 src/exchange-tools/taler-exchange-keyup
-src/exchange-tools/taler-exchange-reservemod
 src/exchange-tools/taler-exchange-wire
 src/exchangedb/perf-exchangedb
 src/benchmark/taler-exchange-benchmark
@@ -92,3 +91,4 @@ contrib/auditor-report.aux
 contrib/auditor-report.log
 contrib/auditor-report.tex
 contrib/auditor-report.pdf
+src/bank-lib/taler-bank-transfer
diff --git a/doc/Makefile.am b/doc/Makefile.am
index fe997cc..cfcbea6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,13 +5,13 @@ SUBDIRS = .
 man_MANS = \
   taler-auditor.1 \
   taler-auditor-sign.1 \
+  taler-bank-transfer.1 \
   taler-config-generate.1 \
   taler-exchange-aggregator.1 \
   taler-exchange-dbinit.1 \
   taler-exchange-httpd.1 \
   taler-exchange-keyup.1 \
   taler-exchange-keycheck.1 \
-  taler-exchange-reservemod.1 \
   taler-exchange-wire.1 \
   taler-exchange-wirewatch.1 \
   taler.conf.5
@@ -35,4 +35,3 @@ EXTRA_DIST = \
   docstyle.css \
   brown-paper.css \
   exchange-db.png
-
diff --git a/doc/taler-bank-transfer.1 b/doc/taler-bank-transfer.1
new file mode 100644
index 0000000..da13229
--- /dev/null
+++ b/doc/taler-bank-transfer.1
@@ -0,0 +1,50 @@
+.TH TALER\-BANK\-TRANSFER 1 "Dec 14, 2017" "GNU Taler"
+
+.SH NAME
+taler\-bank\-transfer \- Trigger a transfer at the bank
+
+.SH SYNOPSIS
+.B taler\-bank\-transfer
+.RI [ options ]
+.br
+
+.SH DESCRIPTION
+\fBtaler\-bank\-transfer\fP is a command line tool to trigger bank transfers.
+
+.SH OPTIONS
+.B
+.IP "\-a VALUE,  \-\-amount=VALUE"
+Amount to transfer.  Given in the Taler\-typical format of 
CURRENCY:VALUE.FRACTION
+.B
+.IP "\-b URL,  \-\-bank=URL"
+URL at which the bank is operation.
+.B
+.IP "\-c FILENAME,  \-\-config=FILENAME"
+Use the given configuration file.
+.B
+.IP "\-h, \-\-help"
+Print short help on options.
+.B
+.IP "\-D ACCOUNT,  \-\-debit=ACCOUNT"
+The money should be debited from ACCOUNT.  Specifies the number of the account.
+.B
+.IP "\-C ACCOUNT,  \-\-credit=ACCOUNT"
+The money should be credited to ACCOUNT.  Specifies the number of the account.
+.B
+.IP "\-s STRING,  \-\-subject=STRING"
+Use STRING for the wire transfer subject.
+.B
+.IP "\-u USERNAME,  \-\-user=USERNAME"
+Specifies the username for authentication.
+.B
+.IP "\-p PASSPHRASE,  \-\-pass=PASSPHRASE"
+Specifies the pass phrase for authentication.
+.B
+.IP "\-v, \-\-version"
+Print version information.
+
+.SH BUGS
+Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending 
electronic mail to <address@hidden>
+
+.SH "SEE ALSO"
+\fBtaler\-bank\-manage\fP(1), \fBtaler.conf\fP(5)
diff --git a/doc/taler-exchange-reservemod.1 b/doc/taler-exchange-reservemod.1
deleted file mode 100644
index c74eafb..0000000
--- a/doc/taler-exchange-reservemod.1
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH TALER\-EXCHANGE\-RESERVEMOD 1 "Apr 22, 2015" "GNU Taler"
-
-.SH NAME
-taler\-exchange\-reservemod \- Modify reserve balance in the Taler exchange 
database.
-
-.SH SYNOPSIS
-.B taler\-exchange\-reservemod
-.RI [ options ]
-.br
-
-.SH DESCRIPTION
-\fBtaler\-exchange\-reservemod\fP is a command line tool to modify reserves in 
the Taler exchange database.  Basically, it can be used to import deposits, 
either for testing or as part of the import from the list of incoming 
transactions.
-
-.SH OPTIONS
-.B
-.IP "\-a DENOM,  \-\-add=DENOM"
-Amount to add to the reserve.
-.B
-.IP "\-d DIRNAME,  \-\-exchange-dir=DIRNAME"
-Use the configuration and other resources for the exchange to operate from 
DIRNAME.
-.B
-.IP "\-h, \-\-help"
-Print short help on options.
-.B
-.IP "\-s JSON,  \-\-sender=JSON"
-JSON-formatted acount details of the sender of the wire transfer.
-.B
-.IP "\-t JSON,  \-\-transfer=JSON"
-JSON-formatted details that uniquely identify the wire transfer.
-.B
-.IP "\-R KEY,  \-\-reserve=KEY"
-Public EdDSA key of the reserve to modify.
-.B
-.IP "\-v, \-\-version"
-Print version information.
-
-.SH BUGS
-Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending 
electronic mail to <address@hidden>
-
-.SH "SEE ALSO"
-\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), 
\fBtaler\-exchange\-dbinit\fP(1), \fBtaler.conf\fP(5)
diff --git a/doc/taler-exchange.texi b/doc/taler-exchange.texi
index 558a57e..e354b58 100644
--- a/doc/taler-exchange.texi
+++ b/doc/taler-exchange.texi
@@ -400,13 +400,10 @@ gap. See keys-duration.
 @section Serving
 
 
-The exchange can serve HTTP over both TCP and UNIX domain socket. It
-needs this configuration @emph{twice}, because it opens one connection
-for ordinary REST calls, and one for "/admin" and "/test" REST calls,
-because the operator may want to restrict the access to "/admin".
+The exchange can serve HTTP over both TCP and UNIX domain socket.
 
-The following values are to be configured under the section
address@hidden and @cite{[exchange-admin]}:
+The following values are to be configured in the section
address@hidden:
 
 
 @itemize
@@ -425,13 +422,9 @@ The following values are to be configured under the section
 
 @item
 @cite{unixpath_mode}: number giving the mode with the access
-permissiON MASK for the @cite{unixpath} (i.e. 660 = rw-rw----).
+permission MASK for the @cite{unixpath} (i.e. 660 = rw-rw----).
 @end itemize
 
-The exchange can be started with the @cite{-D} option to disable the 
administrative
-functions entirely.  It is recommended that the administrative API is only
-accessible via a properly protected UNIX domain socket.
-
 
 @node Currency
 @section Currency
@@ -673,7 +666,7 @@ get signed by every auditor he wishes (or is forced to) 
work with.
 
 In a normal scenario, an auditor must have some way of receiving the blob to
 sign (Website, manual delivery, ..).  Nonetheless, the exchange admin can fake
-an auditor signature - for testing purposes - by running the following command
+an auditor signature --- for testing purposes --- by running the following 
command
 
 @example
 taler-auditor-sign -m EXCHANGE_MASTER_PUB -r BLOB -u AUDITOR_URI -o OUTPUT_FILE
diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am
index da8dd9d..967d95e 100644
--- a/src/bank-lib/Makefile.am
+++ b/src/bank-lib/Makefile.am
@@ -6,6 +6,19 @@ if USE_COVERAGE
   XLIB = -lgcov
 endif
 
+bin_PROGRAMS = \
+  taler-bank-transfer
+
+taler_bank_transfer_SOURCES = \
+  taler-bank-transfer.c
+taler_bank_transfer_LDADD = \
+  $(LIBGCRYPT_LIBS) \
+  $(top_builddir)/src/util/libtalerutil.la \
+  libtalerbank.la \
+  -lgnunetcurl \
+  -lgnunetutil \
+  -ljansson $(XLIB)
+
 lib_LTLIBRARIES = \
   libtalerbank.la \
   libtalerfakebank.la
diff --git a/src/bank-lib/taler-bank-transfer.c 
b/src/bank-lib/taler-bank-transfer.c
new file mode 100644
index 0000000..4ba8a02
--- /dev/null
+++ b/src/bank-lib/taler-bank-transfer.c
@@ -0,0 +1,264 @@
+/*
+  This file is part of TALER
+  Copyright (C) 2017 GNUnet e.V.
+
+  TALER is free software; you can redistribute it and/or modify it under the
+  terms of the GNU General Public License as published by the Free Software
+  Foundation; either version 3, or (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along with
+  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file taler-bank-transfer.c
+ * @brief Execute wire transfer.
+ * @author Christian Grothoff
+ */
+#include "platform.h"
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_json_lib.h>
+#include <jansson.h>
+#include "taler_bank_service.h"
+
+/**
+ * Bank URL.
+ */
+static char *bank_url;
+
+/**
+ * Amount to transfer.
+ */
+static struct TALER_Amount amount;
+
+/**
+ * Debit account number.
+ */
+static unsigned long long debit_account_no;
+
+/**
+ * Credit account number.
+ */
+static unsigned long long credit_account_no;
+
+/**
+ * Wire transfer subject.
+ */
+static char *subject;
+
+/**
+ * Username for authentication.
+ */
+static char *username;
+
+/**
+ * Password for authentication.
+ */
+static char *password;
+
+/**
+ * Return value from main().
+ */
+static int global_ret;
+
+/**
+ * Main execution context for the main loop.
+ */
+static struct GNUNET_CURL_Context *ctx;
+
+/**
+ * Handle to access the exchange.
+ */
+static struct TALER_BANK_AdminAddIncomingHandle *op;
+
+/**
+ * Context for running the CURL event loop.
+ */
+static struct GNUNET_CURL_RescheduleContext *rc;
+
+
+/**
+ * Function run when the test terminates (good or bad).
+ * Cleans up our state.
+ *
+ * @param cls NULL
+ */
+static void
+do_shutdown (void *cls)
+{
+  if (NULL != op)
+  {
+    TALER_BANK_admin_add_incoming_cancel (op);
+    op = NULL;
+  }
+  if (NULL != ctx)
+  {
+    GNUNET_CURL_fini (ctx);
+    ctx = NULL;
+  }
+  if (NULL != rc)
+  {
+    GNUNET_CURL_gnunet_rc_destroy (rc);
+    rc = NULL;
+  }
+}
+
+
+/**
+ * Function called with the result of the operation.
+ *
+ * @param cls closure
+ * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful 
status request
+ *                    0 if the bank's reply is bogus (fails to follow the 
protocol)
+ * @param ec detailed error code
+ * @param serial_id unique ID of the wire transfer in the bank's records; 
UINT64_MAX on error
+ * @param json detailed response from the HTTPD, or NULL if reply was not in 
JSON
+ */
+static void
+res_cb (void *cls,
+        unsigned int http_status,
+        enum TALER_ErrorCode ec,
+        uint64_t serial_id,
+        const json_t *json)
+{
+  op = NULL;
+  switch (ec)
+  {
+  case TALER_EC_NONE:
+    global_ret = 0;
+    fprintf (stdout,
+             "%llu\n",
+             (unsigned long long) serial_id);
+    break;
+  default:
+    fprintf (stderr,
+             "Operation failed with staus code %u/%u\n",
+             (unsigned int) ec,
+             http_status);
+    if (NULL != json)
+      json_dumpf (json,
+                  stderr,
+                  JSON_INDENT (2));
+    break;
+  }
+  GNUNET_SCHEDULER_shutdown ();
+}
+
+
+/**
+ * Main function that will be run.
+ *
+ * @param cls closure
+ * @param args remaining command-line arguments
+ * @param cfgfile name of the configuration file used (for saving, can be 
NULL!)
+ * @param cfg configuration
+ */
+static void
+run (void *cls,
+     char *const *args,
+     const char *cfgfile,
+     const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
+  struct TALER_BANK_AuthenticationData auth;
+
+  ctx = GNUNET_CURL_init (&GNUNET_CURL_gnunet_scheduler_reschedule,
+                          &rc);
+  GNUNET_assert (NULL != ctx);
+  rc = GNUNET_CURL_gnunet_rc_create (ctx);
+
+  auth.method = TALER_BANK_AUTH_BASIC;
+  auth.details.basic.username = username;
+  auth.details.basic.password = password;
+  op = TALER_BANK_admin_add_incoming (ctx,
+                                      bank_url,
+                                      &auth,
+                                      "https://exchange.com/legacy";,
+                                      subject,
+                                      &amount,
+                                      debit_account_no,
+                                      credit_account_no,
+                                      &res_cb,
+                                      NULL);
+  GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+                                 NULL);
+  if (NULL == op)
+    GNUNET_SCHEDULER_shutdown ();
+}
+
+
+/**
+ * The main function of the reservemod tool
+ *
+ * @param argc number of arguments from the command line
+ * @param argv command line arguments
+ * @return 0 ok, 1 on error
+ */
+int
+main (int argc, char *const *argv)
+{
+  const struct GNUNET_GETOPT_CommandLineOption options[] = {
+    GNUNET_GETOPT_option_mandatory
+    (TALER_getopt_get_amount ('a',
+                              "amount",
+                              "VALUE",
+                              "value to transfer",
+                              &amount)),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_string ('b',
+                                  "bank",
+                                  "URL",
+                                  "base URL of the bank",
+                                  &bank_url)),
+    GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_ulong ('C',
+                                 "credit",
+                                 "ACCOUNT",
+                                 "number of the bank account to credit",
+                                 &credit_account_no)),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_ulong ('D',
+                                 "debit",
+                                 "ACCOUNT",
+                                 "number of the bank account to debit",
+                                 &debit_account_no)),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_string ('s',
+                                  "subject",
+                                  "STRING",
+                                  "specifies the wire transfer subject",
+                                  &subject)),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_string ('u',
+                                  "user",
+                                  "USERNAME",
+                                  "username to use for authentication",
+                                  &username)),
+    GNUNET_GETOPT_option_mandatory
+    (GNUNET_GETOPT_option_string ('p',
+                                  "pass",
+                                  "PASSPHRASE",
+                                  "passphrase to use for authentication",
+                                  &subject)),
+    GNUNET_GETOPT_OPTION_END
+  };
+
+  GNUNET_assert (GNUNET_OK ==
+                 GNUNET_log_setup ("taler-bank-transfer",
+                                   "WARNING",
+                                   NULL));
+  global_ret = 1;
+  if (GNUNET_OK !=
+      GNUNET_PROGRAM_run (argc, argv,
+                          "taler-bank-transfer",
+                         "Execute bank transfer",
+                         options,
+                         &run, NULL))
+    return 1;
+  return global_ret;
+}
+
+/* end taler-bank-transfer.c */
diff --git a/src/exchange-lib/test_exchange_api.c 
b/src/exchange-lib/test_exchange_api.c
index 475fbde..6fd9ad6 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -2870,13 +2870,12 @@ do_shutdown (void *cls)
 {
   struct InterpreterState *is = cls;
   struct Command *cmd;
-  unsigned int i;
 
   fprintf (stderr,
            "Executing shutdown at `%s'\n",
            is->commands[is->ip].label);
 
-  for (i=0;OC_END != (cmd = &is->commands[i])->oc;i++)
+  for (unsigned int i=0;OC_END != (cmd = &is->commands[i])->oc;i++)
   {
     switch (cmd->oc)
     {
diff --git a/src/exchange-tools/Makefile.am b/src/exchange-tools/Makefile.am
index 8eb2ac2..8d00415 100644
--- a/src/exchange-tools/Makefile.am
+++ b/src/exchange-tools/Makefile.am
@@ -15,7 +15,6 @@ endif
 bin_PROGRAMS = \
   taler-exchange-keyup \
   taler-exchange-keycheck \
-  taler-exchange-reservemod \
   taler-exchange-wire \
   taler-exchange-dbinit
 
@@ -51,23 +50,6 @@ taler_exchange_keycheck_LDADD = \
   -lgnunetutil  $(XLIB)
 taler_exchange_keycheck_LDFLAGS = $(POSTGRESQL_LDFLAGS)
 
-taler_exchange_reservemod_SOURCES = \
-  taler-exchange-reservemod.c
-taler_exchange_reservemod_LDADD = \
-  $(LIBGCRYPT_LIBS) \
-  $(top_builddir)/src/util/libtalerutil.la \
-  $(top_builddir)/src/pq/libtalerpq.la \
-  $(top_builddir)/src/exchangedb/libtalerexchangedb.la \
-  -lgnunetjson \
-  -lgnunetutil \
-  -ljansson $(XLIB)
-taler_exchange_reservemod_LDFLAGS = \
-  $(POSTGRESQL_LDFLAGS)
-taler_exchange_reservemod_CPPFLAGS = \
-  -I$(top_srcdir)/src/include \
-  -I$(top_srcdir)/src/pq/ \
-  $(POSTGRESQL_CPPFLAGS)
-
 taler_exchange_dbinit_SOURCES = \
   taler-exchange-dbinit.c
 taler_exchange_dbinit_LDADD = \
diff --git a/src/exchange-tools/taler-exchange-reservemod.c 
b/src/exchange-tools/taler-exchange-reservemod.c
deleted file mode 100644
index e901b69..0000000
--- a/src/exchange-tools/taler-exchange-reservemod.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2014-2017 GNUnet e.V.
-
-  TALER is free software; you can redistribute it and/or modify it under the
-  terms of the GNU General Public License as published by the Free Software
-  Foundation; either version 3, or (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along with
-  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
-*/
-/**
- * @file taler-exchange-reservemod.c
- * @brief Modify reserves.  Allows manipulation of reserve balances.
- * @author Florian Dold
- * @author Benedikt Mueller
- */
-#include "platform.h"
-#include <gnunet/gnunet_util_lib.h>
-#include <gnunet/gnunet_json_lib.h>
-#include <libpq-fe.h>
-#include <jansson.h>
-#include "taler_exchangedb_plugin.h"
-
-/**
- * Director of the exchange, containing the keys.
- */
-static char *exchange_directory;
-
-/**
- * Our DB plugin.
- */
-static struct TALER_EXCHANGEDB_Plugin *plugin;
-
-/**
- * Public key of the reserve.
- */
-static struct TALER_ReservePublicKeyP reserve_pub;
-
-/**
- * Amount to add.  Invalid if not initialized.
- */
-static struct TALER_Amount add_value;
-
-/**
- * Details about the sender account in JSON format.
- */
-static json_t *sender_details;
-
-/**
- * Details about the wire transfer in JSON format.
- */
-static json_t *transfer_details;
-
-/**
- * Return value from main().
- */
-static int global_ret;
-
-
-/**
- * Run the database transaction.
- *
- * @param reserve_pub public key of the reserve to use
- * @param add_value value to add
- * @param jdetails JSON details about sender
- * @param tdetails JSON details about transfer
- * @return #GNUNET_OK on success, #GNUNET_SYSERR on hard error,
- *         #GNUNET_NO if record exists
- */
-static int
-run_transaction (const struct TALER_ReservePublicKeyP *reserve_pub,
-                 const struct TALER_Amount *add_value,
-                 json_t *jdetails,
-                 json_t *tdetails)
-{
-  int ret;
-  struct TALER_EXCHANGEDB_Session *session;
-  void *json_str;
-  struct GNUNET_TIME_Absolute now;
-
-  session = plugin->get_session (plugin->cls);
-  if (NULL == session)
-  {
-    fprintf (stderr,
-             "Failed to initialize DB session\n");
-    return GNUNET_SYSERR;
-  }
-  /* FIXME: maybe allow passing timestamp via command-line? */
-  json_str = json_dumps (tdetails,
-                         JSON_INDENT(2));
-  if (NULL == json_str)
-  {
-    GNUNET_break (0); /* out of memory? */
-    return GNUNET_SYSERR;
-  }
-  now = GNUNET_TIME_absolute_get ();
-  (void) GNUNET_TIME_round_abs (&now);
-  ret = plugin->reserves_in_insert (plugin->cls,
-                                    session,
-                                    reserve_pub,
-                                    add_value,
-                                    now,
-                                    jdetails,
-                                    json_str,
-                                    strlen (json_str));
-  free (json_str);
-  if (GNUNET_SYSERR == ret)
-  {
-    fprintf (stderr,
-             "Failed to update reserve.\n");
-  }
-  if (GNUNET_NO == ret)
-  {
-    fprintf (stderr,
-             "Record exists, reserve not updated.\n");
-  }
-  return ret;
-}
-
-
-/**
- * Main function that will be run.
- *
- * @param cls closure
- * @param args remaining command-line arguments
- * @param cfgfile name of the configuration file used (for saving, can be 
NULL!)
- * @param cfg configuration
- */
-static void
-run (void *cls,
-     char *const *args,
-     const char *cfgfile,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
-{
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_filename (cfg,
-                                               "exchange",
-                                               "KEYDIR",
-                                               &exchange_directory))
-  {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                               "exchange",
-                               "KEYDIR");
-    global_ret = 1;
-    return;
-  }
-  if (NULL ==
-      (plugin = TALER_EXCHANGEDB_plugin_load (cfg)))
-  {
-    fprintf (stderr,
-             "Failed to initialize database plugin.\n");
-    global_ret = 1;
-    return;
-  }
-  if (GNUNET_SYSERR ==
-      run_transaction (&reserve_pub,
-                       &add_value,
-                       sender_details,
-                       transfer_details))
-    global_ret = 1;
-  TALER_EXCHANGEDB_plugin_unload (plugin);
-  json_decref (transfer_details);
-  json_decref (sender_details);
-}
-
-
-/**
- * The main function of the reservemod tool
- *
- * @param argc number of arguments from the command line
- * @param argv command line arguments
- * @return 0 ok, 1 on error
- */
-int
-main (int argc, char *const *argv)
-{
-  const struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_option_mandatory
-    (TALER_getopt_get_amount ('a',
-                              "add",
-                              "DENOM",
-                              "value to add",
-                              &add_value)),
-    GNUNET_GETOPT_option_mandatory
-    (GNUNET_JSON_getopt ('s',
-                         "sender",
-                         "JSON",
-                         "details about the sender's bank account",
-                         &sender_details)),
-    GNUNET_GETOPT_option_mandatory
-    (GNUNET_JSON_getopt ('t',
-                         "transfer",
-                         "JSON",
-                         "details that uniquely identify the bank transfer",
-                         &transfer_details)),
-    GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
-    GNUNET_GETOPT_option_mandatory
-    (GNUNET_GETOPT_option_base32_auto ('R',
-                                       "reserve",
-                                       "KEY",
-                                       "reserve (public key) to modify",
-                                       &reserve_pub)),
-    GNUNET_GETOPT_OPTION_END
-  };
-
-  GNUNET_assert (GNUNET_OK ==
-                 GNUNET_log_setup ("taler-exchange-reservemod",
-                                   "WARNING",
-                                   NULL));
-  if (GNUNET_OK !=
-      GNUNET_PROGRAM_run (argc, argv,
-                          "taler-exchange-reservemod",
-                         "Deposit funds into a Taler reserve",
-                         options,
-                         &run, NULL))
-    return 1;
-  return global_ret;
-}
-
-/* end taler-exchange-reservemod.c */
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index 9ff98d1..b5419a7 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -43,7 +43,6 @@ taler_exchange_wirewatch_LDADD = \
 
 taler_exchange_httpd_SOURCES = \
   taler-exchange-httpd.c taler-exchange-httpd.h \
-  taler-exchange-httpd_admin.c taler-exchange-httpd_admin.h \
   taler-exchange-httpd_db.c taler-exchange-httpd_db.h \
   taler-exchange-httpd_deposit.c taler-exchange-httpd_deposit.h \
   taler-exchange-httpd_keystate.c taler-exchange-httpd_keystate.h \
diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index 4c10b31..39c496e 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -36,18 +36,3 @@ PORT = 8081
 # Required for wire transfers as we need to include it in the wire
 # transfers to enable tracking.
 BASE_URL = http://localhost:8081/
-
-
-[exchange-admin]
-# Network configuration for the /admin HTTP server
-
-# serve via tcp socket (on PORT)
-SERVE = tcp
-
-# Unix domain socket to listen on,
-# only effective with "SERVE = unix"
-UNIXPATH = ${TALER_RUNTIME_DIR}/exchange-admin.http
-UNIXPATH_MODE = 660
-
-# HTTP port the exchange listens to
-PORT = 18080
diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index 42fe16b..f45b547 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -28,7 +28,6 @@
 #include <pthread.h>
 #include "taler-exchange-httpd_parsing.h"
 #include "taler-exchange-httpd_mhd.h"
-#include "taler-exchange-httpd_admin.h"
 #include "taler-exchange-httpd_deposit.h"
 #include "taler-exchange-httpd_refund.h"
 #include "taler-exchange-httpd_reserve_status.h"
@@ -96,16 +95,6 @@ static unsigned int connection_timeout = 30;
 static struct MHD_Daemon *mhd;
 
 /**
- * The HTTP Daemon for /admin-requests.
- */
-static struct MHD_Daemon *mhd_admin;
-
-/**
- * Do not offer /admin API.
- */
-static int no_admin;
-
-/**
  * Initialize the database by creating tables and indices.
  */
 static int init_db;
@@ -116,32 +105,16 @@ static int init_db;
 static uint16_t serve_port;
 
 /**
- * Port to run the admin daemon on.
- */
-static uint16_t serve_admin_port;
-
-/**
  * Path for the unix domain-socket
  * to run the daemon on.
  */
 static char *serve_unixpath;
 
 /**
- * Path for the unix domain-socket
- * to run the admin daemon on.
- */
-static char *serve_admin_unixpath;
-
-/**
  * File mode for unix-domain socket.
  */
 static mode_t unixpath_mode;
 
-/**
- * File mode for unix-domain socket.
- */
-static mode_t unixpath_admin_mode;
-
 
 /**
  * Function called whenever MHD is done with a request.  If the
@@ -307,76 +280,6 @@ handle_mhd_request (void *cls,
         "Only GET is allowed", 0,
         &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
 
-      { NULL, NULL, NULL, NULL, 0, 0 }
-    };
-  static struct TEH_RequestHandler h404 =
-    {
-      "", NULL, "text/html",
-      "<html><title>404: not found</title></html>", 0,
-      &TEH_MHD_handler_static_response, MHD_HTTP_NOT_FOUND
-    };
-  struct TEH_RequestHandler *rh;
-
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Handling request for URL '%s'\n",
-              url);
-  if (0 == strcasecmp (method,
-                       MHD_HTTP_METHOD_HEAD))
-    method = MHD_HTTP_METHOD_GET; /* treat HEAD as GET here, MHD will do the 
rest */
-  for (unsigned int i=0;NULL != handlers[i].url;i++)
-  {
-    rh = &handlers[i];
-    if ( (0 == strcasecmp (url,
-                           rh->url)) &&
-         ( (NULL == rh->method) ||
-           (0 == strcasecmp (method,
-                             rh->method)) ) )
-      return rh->handler (rh,
-                          connection,
-                          con_cls,
-                          upload_data,
-                          upload_data_size);
-  }
-  return TEH_MHD_handler_static_response (&h404,
-                                          connection,
-                                          con_cls,
-                                          upload_data,
-                                          upload_data_size);
-}
-
-
-/**
- * Handle incoming administrative HTTP request.
- *
- * @param cls closure for MHD daemon (unused)
- * @param connection the connection
- * @param url the requested url
- * @param method the method (POST, GET, ...)
- * @param version HTTP version (ignored)
- * @param upload_data request data
- * @param upload_data_size size of @a upload_data in bytes
- * @param con_cls closure for request (a `struct Buffer *`)
- * @return MHD result code
- */
-static int
-handle_mhd_admin_request (void *cls,
-                          struct MHD_Connection *connection,
-                          const char *url,
-                          const char *method,
-                          const char *version,
-                          const char *upload_data,
-                          size_t *upload_data_size,
-                          void **con_cls)
-{
-  static struct TEH_RequestHandler handlers[] =
-    {
-      { "/admin/add/incoming", MHD_HTTP_METHOD_POST, "application/json",
-        NULL, 0,
-        &TEH_ADMIN_handler_admin_add_incoming, MHD_HTTP_OK },
-      { "/admin/add/incoming", NULL, "text/plain",
-        "Only POST is allowed", 0,
-        &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
-
 #if HAVE_DEVELOPER
       /* Client crypto-interoperability test functions */
       { "/test", MHD_HTTP_METHOD_POST, "application/json",
@@ -452,12 +355,14 @@ handle_mhd_admin_request (void *cls,
       &TEH_MHD_handler_static_response, MHD_HTTP_NOT_FOUND
     };
   struct TEH_RequestHandler *rh;
-  unsigned int i;
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Handling request for URL '%s'\n",
               url);
-  for (i=0;NULL != handlers[i].url;i++)
+  if (0 == strcasecmp (method,
+                       MHD_HTTP_METHOD_HEAD))
+    method = MHD_HTTP_METHOD_GET; /* treat HEAD as GET here, MHD will do the 
rest */
+  for (unsigned int i=0;NULL != handlers[i].url;i++)
   {
     rh = &handlers[i];
     if ( (0 == strcasecmp (url,
@@ -691,15 +596,6 @@ exchange_serve_process_config ()
     TEH_VALIDATION_done ();
     return GNUNET_SYSERR;
   }
-  if (GNUNET_OK !=
-      parse_port_config ("exchange-admin",
-                         &serve_admin_port,
-                         &serve_admin_unixpath,
-                         &unixpath_admin_mode))
-  {
-    TEH_VALIDATION_done ();
-    return GNUNET_SYSERR;
-  }
   return GNUNET_OK;
 }
 
@@ -948,23 +844,19 @@ main (int argc,
   char *logfile = NULL;
   const struct GNUNET_GETOPT_CommandLineOption options[] = {
     GNUNET_GETOPT_option_flag ('C',
-                                  "connection-close",
-                                  "force HTTP connections to be closed after 
each request",
-                                  &TEH_exchange_connection_close),
+                               "connection-close",
+                               "force HTTP connections to be closed after each 
request",
+                               &TEH_exchange_connection_close),
     GNUNET_GETOPT_option_cfgfile (&cfgfile),
-    GNUNET_GETOPT_option_flag ('D',
-                                  "disable-admin",
-                                  "do not run the /admin-HTTP server",
-                                  &no_admin),
     GNUNET_GETOPT_option_flag ('i',
-                                  "init-db",
-                                  "create database tables and indicies if 
necessary",
-                                  &init_db),
+                               "init-db",
+                               "create database tables and indicies if 
necessary",
+                               &init_db),
    GNUNET_GETOPT_option_uint ('t',
-                                  "timeout",
-                                  "SECONDS",
-                                  "after how long do connections timeout by 
default (in seconds)",
-                                  &connection_timeout),
+                              "timeout",
+                              "SECONDS",
+                              "after how long do connections timeout by 
default (in seconds)",
+                              &connection_timeout),
 #if HAVE_DEVELOPER
    GNUNET_GETOPT_option_filename ('f',
                                   "file-input",
@@ -982,7 +874,6 @@ main (int argc,
   const char *listen_pid;
   const char *listen_fds;
   int fh = -1;
-  int fh_admin = -1;
 
   if (0 >=
       GNUNET_GETOPT_run ("taler-exchange-httpd",
@@ -1018,12 +909,9 @@ main (int argc,
        (getpid() == strtol (listen_pid,
                             NULL,
                             10)) &&
-       ( (1 == strtoul (listen_fds,
-                        NULL,
-                        10)) ||
-         (2 == strtoul (listen_fds,
-                        NULL,
-                        10)) ) )
+       (1 == strtoul (listen_fds,
+                      NULL,
+                      10)) )
   {
     int flags;
 
@@ -1044,29 +932,6 @@ main (int argc,
                       flags)) )
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
                            "fcntl");
-
-    if (2 == strtoul (listen_fds,
-                      NULL,
-                      10))
-    {
-      fh_admin = 4;
-      flags = fcntl (fh_admin,
-                     F_GETFD);
-      if ( (-1 == flags) &&
-           (EBADF == errno) )
-      {
-        fprintf (stderr,
-                 "Bad listen socket passed, ignored\n");
-        fh_admin = -1;
-      }
-      flags |= FD_CLOEXEC;
-      if ( (-1 != fh_admin) &&
-           (0 != fcntl (fh_admin,
-                        F_SETFD,
-                        flags)) )
-        GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                             "fcntl");
-    }
   }
 
   /* consider unix path */
@@ -1078,19 +943,6 @@ main (int argc,
     if (-1 == fh)
       return 1;
   }
-  if ( (-1 == fh_admin) &&
-       (0 == no_admin) &&
-       (NULL != serve_admin_unixpath) )
-  {
-    fh_admin = open_unix_path (serve_admin_unixpath,
-                               unixpath_admin_mode);
-    if (-1 == fh_admin)
-    {
-      if (-1 != fh)
-        GNUNET_break (0 == close (fh));
-      return 1;
-    }
-  }
 
   mhd
     = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_PIPE_FOR_SHUTDOWN 
| MHD_USE_DEBUG | MHD_USE_DUAL_STACK,
@@ -1112,30 +964,6 @@ main (int argc,
     return 1;
   }
 
-  if (0 == no_admin)
-  {
-    mhd_admin
-      = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | 
MHD_USE_PIPE_FOR_SHUTDOWN | MHD_USE_DEBUG,
-                          (-1 == fh) ? serve_admin_port : 0,
-                          NULL, NULL,
-                          &handle_mhd_admin_request, NULL,
-                          MHD_OPTION_LISTEN_SOCKET, fh_admin,
-                          MHD_OPTION_EXTERNAL_LOGGER, &handle_mhd_logs, NULL,
-                          MHD_OPTION_NOTIFY_COMPLETED, 
&handle_mhd_completion_callback, NULL,
-                          MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout,
-#if HAVE_DEVELOPER
-                          MHD_OPTION_NOTIFY_CONNECTION, &connection_done, NULL,
-#endif
-                          MHD_OPTION_END);
-    if (NULL == mhd_admin)
-    {
-      fprintf (stderr,
-               "Failed to start administrative HTTP server.\n");
-      MHD_stop_daemon (mhd);
-      return 1;
-    }
-  }
-
 #if HAVE_DEVELOPER
   if (NULL != input_filename)
   {
@@ -1157,23 +985,14 @@ main (int argc,
   case GNUNET_OK:
   case GNUNET_SYSERR:
     MHD_stop_daemon (mhd);
-    if (NULL != mhd_admin)
-      MHD_stop_daemon (mhd_admin);
     break;
   case GNUNET_NO:
     {
       MHD_socket sock = MHD_quiesce_daemon (mhd);
-      MHD_socket admin_sock;
-      int admin_sock_opened = GNUNET_NO;
       pid_t chld;
       int flags;
 
       /* Set flags to make 'sock' inherited by child */
-      if (NULL != mhd_admin)
-      {
-        admin_sock = MHD_quiesce_daemon (mhd_admin);
-        admin_sock_opened = GNUNET_YES;
-      }
       flags = fcntl (sock, F_GETFD);
       GNUNET_assert (-1 != flags);
       flags &= ~FD_CLOEXEC;
@@ -1197,20 +1016,13 @@ main (int argc,
                                "dup2");
           _exit (1);
         }
-        if ( (GNUNET_YES == admin_sock_opened) &&
-             (4 != dup2 (admin_sock, 4)) )
-        {
-          GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                               "dup2");
-          _exit (1);
-        }
         /* Tell the child that it is the desired recipient for FD #3 */
         GNUNET_snprintf (pids,
                          sizeof (pids),
                          "%u",
                          getpid ());
         setenv ("LISTEN_PID", pids, 1);
-        setenv ("LISTEN_FDS", (NULL != mhd_admin) ? "2" : "1", 1);
+        setenv ("LISTEN_FDS", "1", 1);
         /* Finally, exec the (presumably) more recent exchange binary */
         execvp ("taler-exchange-httpd",
                 argv);
@@ -1222,25 +1034,16 @@ main (int argc,
          before exiting; as the listen socket is no longer used,
          close it here */
       GNUNET_break (0 == close (sock));
-      if (GNUNET_YES == admin_sock_opened)
-        GNUNET_break (0 == close (admin_sock));
-      while ( (0 != MHD_get_daemon_info (mhd,
-                                         
MHD_DAEMON_INFO_CURRENT_CONNECTIONS)->num_connections) ||
-              ( (NULL != mhd_admin) &&
-                (0 != MHD_get_daemon_info (mhd_admin,
-                                           
MHD_DAEMON_INFO_CURRENT_CONNECTIONS)->num_connections) ) )
+      while (0 != MHD_get_daemon_info (mhd,
+                                       
MHD_DAEMON_INFO_CURRENT_CONNECTIONS)->num_connections)
         sleep (1);
       /* Now we're really done, practice clean shutdown */
       MHD_stop_daemon (mhd);
-      if (NULL != mhd_admin)
-        MHD_stop_daemon (mhd_admin);
     }
     break;
   default:
     GNUNET_break (0);
     MHD_stop_daemon (mhd);
-    if (NULL != mhd_admin)
-      MHD_stop_daemon (mhd_admin);
     break;
   }
   TALER_EXCHANGEDB_plugin_unload (TEH_plugin);
diff --git a/src/exchange/taler-exchange-httpd_admin.c 
b/src/exchange/taler-exchange-httpd_admin.c
deleted file mode 100644
index f65b9c3..0000000
--- a/src/exchange/taler-exchange-httpd_admin.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2014, 2015 GNUnet e.V.
-
-  TALER is free software; you can redistribute it and/or modify it under the
-  terms of the GNU Affero General Public License as published by the Free 
Software
-  Foundation; either version 3, or (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more 
details.
-
-  You should have received a copy of the GNU Affero General Public License 
along with
-  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
-*/
-/**
- * @file taler-exchange-httpd_admin.c
- * @brief Handle /admin/ requests
- * @author Christian Grothoff
- */
-#include "platform.h"
-#include <gnunet/gnunet_util_lib.h>
-#include <jansson.h>
-#include "taler-exchange-httpd_admin.h"
-#include "taler-exchange-httpd_parsing.h"
-#include "taler-exchange-httpd_responses.h"
-#include "taler-exchange-httpd_validation.h"
-
-
-/**
- * Closure for #admin_add_incoming_transaction()
- */
-struct AddIncomingContext
-{
-  /**
-   * public key of the reserve
-   */
-  struct TALER_ReservePublicKeyP reserve_pub;
-
-  /**
-   * amount to add to the reserve
-   */
-  struct TALER_Amount amount;
-
-  /**
-   * When did we receive the wire transfer
-   */
-  struct GNUNET_TIME_Absolute execution_time;
-
-  /**
-   * which account send the funds
-   */
-  json_t *sender_account_details;
-
-  /**
-   * Information that uniquely identifies the transfer
-   */
-  json_t *transfer_details;
-
-  /**
-   * Set to the transaction status.
-   */
-  enum GNUNET_DB_QueryStatus qs;
-};
-
-
-/**
- * Add an incoming transaction to the database.  Checks if the
- * transaction is fresh (not a duplicate) and if so adds it to the
- * database.
- *
- * If it returns a non-error code, the transaction logic MUST
- * NOT queue a MHD response.  IF it returns an hard error, the
- * transaction logic MUST queue a MHD response and set @a mhd_ret.  IF
- * it returns the soft error code, the function MAY be called again to
- * retry and MUST not queue a MHD response.
- *
- * @param cls closure with the `struct AddIncomingContext *`
- * @param connection MHD request which triggered the transaction
- * @param session database session to use
- * @param[out] mhd_ret set to MHD response status for @a connection,
- *             if transaction failed (!)
- * @return transaction status
- */
-static enum GNUNET_DB_QueryStatus
-admin_add_incoming_transaction (void *cls,
-                               struct MHD_Connection *connection,
-                               struct TALER_EXCHANGEDB_Session *session,
-                               int *mhd_ret)
-{
-  struct AddIncomingContext *aic = cls;
-  void *json_str;
-
-  json_str = json_dumps (aic->transfer_details,
-                         JSON_INDENT(2));
-  if (NULL == json_str)
-  {
-    GNUNET_break (0);
-    *mhd_ret = TEH_RESPONSE_reply_internal_db_error (connection,
-                                                    
TALER_EC_PARSER_OUT_OF_MEMORY);
-    return GNUNET_DB_STATUS_HARD_ERROR;
-  }
-  aic->qs = TEH_plugin->reserves_in_insert (TEH_plugin->cls,
-                                           session,
-                                           &aic->reserve_pub,
-                                           &aic->amount,
-                                           aic->execution_time,
-                                           aic->sender_account_details,
-                                           json_str,
-                                           strlen (json_str));
-  free (json_str);
-
-  if (GNUNET_DB_STATUS_HARD_ERROR == aic->qs)
-  {
-    GNUNET_break (0);
-    *mhd_ret = TEH_RESPONSE_reply_internal_db_error (connection,
-                                                    
TALER_EC_ADMIN_ADD_INCOMING_DB_STORE);
-    return GNUNET_DB_STATUS_HARD_ERROR;
-  }
-  return aic->qs;
-}
-
-
-/**
- * Handle a "/admin/add/incoming" request.  Parses the
- * given "reserve_pub", "amount", "transaction" and "h_wire"
- * details and adds the respective transaction to the database.
- *
- * @param rh context of the handler
- * @param connection the MHD connection to handle
- * @param[in,out] connection_cls the connection's closure (can be updated)
- * @param upload_data upload data
- * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
- * @return MHD result code
-  */
-int
-TEH_ADMIN_handler_admin_add_incoming (struct TEH_RequestHandler *rh,
-                                      struct MHD_Connection *connection,
-                                      void **connection_cls,
-                                      const char *upload_data,
-                                      size_t *upload_data_size)
-{
-  struct AddIncomingContext aic;
-  enum TALER_ErrorCode ec;
-  char *emsg;
-  json_t *root;
-  struct GNUNET_JSON_Specification spec[] = {
-    GNUNET_JSON_spec_fixed_auto ("reserve_pub", &aic.reserve_pub),
-    TALER_JSON_spec_amount ("amount", &aic.amount),
-    GNUNET_JSON_spec_absolute_time ("execution_date", &aic.execution_time),
-    GNUNET_JSON_spec_json ("sender_account_details", 
&aic.sender_account_details),
-    GNUNET_JSON_spec_json ("transfer_details", &aic.transfer_details),
-    GNUNET_JSON_spec_end ()
-  };
-  int res;
-  int mhd_ret;
-
-  res = TEH_PARSE_post_json (connection,
-                             connection_cls,
-                             upload_data,
-                             upload_data_size,
-                             &root);
-  if (GNUNET_SYSERR == res)
-    return MHD_NO;
-  if ( (GNUNET_NO == res) ||
-       (NULL == root) )
-    return MHD_YES;
-  res = TEH_PARSE_json_data (connection,
-                             root,
-                             spec);
-  json_decref (root);
-  if (GNUNET_OK != res)
-  {
-    GNUNET_break_op (0);
-    json_decref (root);
-    return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES;
-  }
-  if (TALER_EC_NONE !=
-      (ec = TEH_json_validate_wireformat (aic.sender_account_details,
-                                          GNUNET_NO,
-                                          &emsg)))
-  {
-    GNUNET_JSON_parse_free (spec);
-    mhd_ret = TEH_RESPONSE_reply_external_error (connection,
-                                                ec,
-                                                emsg);
-    GNUNET_free (emsg);
-    return mhd_ret;
-  }
-  if (0 != strcasecmp (aic.amount.currency,
-                       TEH_exchange_currency_string))
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Exchange uses currency `%s', but /admin/add/incoming tried to 
use currency `%s'\n",
-                TEH_exchange_currency_string,
-                aic.amount.currency);
-    GNUNET_JSON_parse_free (spec);
-    return TEH_RESPONSE_reply_arg_invalid (connection,
-                                          
TALER_EC_ADMIN_ADD_INCOMING_CURRENCY_UNSUPPORTED,
-                                           "amount:currency");
-  }
-  res = TEH_DB_run_transaction (connection,
-                               &mhd_ret,
-                               &admin_add_incoming_transaction,
-                               &aic);
-  GNUNET_JSON_parse_free (spec);
-  if (GNUNET_OK != res)
-    return mhd_ret;
-  return TEH_RESPONSE_reply_json_pack (connection,
-                                       MHD_HTTP_OK,
-                                       "{s:s}",
-                                       "status",
-                                       (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == 
aic.qs)
-                                       ? "NEW"
-                                       : "DUP");
-}
-
-/* end of taler-exchange-httpd_admin.c */
diff --git a/src/exchange/taler-exchange-httpd_admin.h 
b/src/exchange/taler-exchange-httpd_admin.h
deleted file mode 100644
index 8ed1e3d..0000000
--- a/src/exchange/taler-exchange-httpd_admin.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-  This file is part of TALER
-  Copyright (C) 2014 GNUnet e.V.
-
-  TALER is free software; you can redistribute it and/or modify it under the
-  terms of the GNU Affero General Public License as published by the Free 
Software
-  Foundation; either version 3, or (at your option) any later version.
-
-  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more 
details.
-
-  You should have received a copy of the GNU Affero General Public License 
along with
-  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
-*/
-/**
- * @file taler-exchange-httpd_admin.h
- * @brief Handle /admin/ requests
- * @author Christian Grothoff
- */
-#ifndef TALER_EXCHANGE_HTTPD_ADMIN_H
-#define TALER_EXCHANGE_HTTPD_ADMIN_H
-
-#include <microhttpd.h>
-#include "taler-exchange-httpd.h"
-
-/**
- * Handle a "/admin/add/incoming" request.  Parses the
- * given "reserve_pub", "amount", "transaction" and "h_wire"
- * details and adds the respective transaction to the database.
- *
- * @param rh context of the handler
- * @param connection the MHD connection to handle
- * @param[in,out] connection_cls the connection's closure (can be updated)
- * @param upload_data upload data
- * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
- * @return MHD result code
-  */
-int
-TEH_ADMIN_handler_admin_add_incoming (struct TEH_RequestHandler *rh,
-                                      struct MHD_Connection *connection,
-                                      void **connection_cls,
-                                      const char *upload_data,
-                                      size_t *upload_data_size);
-
-#endif

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



reply via email to

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