gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix build system, use libtalerm


From: gnunet
Subject: [taler-anastasis] branch master updated: fix build system, use libtalermhd to reduce code
Date: Sun, 24 Nov 2019 17:54:19 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 287cb14  fix build system, use libtalermhd to reduce code
287cb14 is described below

commit 287cb14190a2267b6809d0819288ef246e6b1422
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Nov 24 17:54:16 2019 +0100

    fix build system, use libtalermhd to reduce code
---
 doc/Makefile.in                         |  13 +-
 m4/libtool.m4                           |  15 +-
 src/backend/Makefile.am                 |   3 +-
 src/backend/anastasis-httpd             |   6 +-
 src/backend/anastasis-httpd.c           | 267 ++------------------------------
 src/backend/anastasis-httpd_truth.c     |  18 +--
 src/backend/anastasis-httpd_truth.h     |  14 +-
 src/include/Makefile.in                 |  13 +-
 src/include/anastasis_service.h         |   2 +-
 src/lib/test_anastasis_api.c            |   2 +-
 src/lib/testing_api_cmd_policy.c        |   6 +-
 src/stasis/Makefile.am                  |  15 +-
 src/{util => stasis}/anastasis-dbinit.c |   2 +-
 src/stasis/anastasis_db_plugin.c        |   2 +-
 src/util/Makefile.am                    |  12 --
 15 files changed, 73 insertions(+), 317 deletions(-)

diff --git a/doc/Makefile.in b/doc/Makefile.in
index 9e540c5..fa03b40 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -343,8 +343,8 @@ Makefile: $(srcdir)/Makefile.in 
$(top_builddir)/config.status
          *config.status*) \
            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles);; \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
@@ -411,10 +411,7 @@ ctags CTAGS:
 cscope cscopelist:
 
 
-distdir: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index c81e669..ee80844 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4063,8 +4063,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | 
$lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
-    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> 
$nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" 
\> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -6439,7 +6438,7 @@ if test yes != "$_lt_caught_CXX_error"; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | 
$GREP -v "^Configured with:" | $GREP " \-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | 
$GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -6814,7 +6813,7 @@ if test yes != "$_lt_caught_CXX_error"; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v 
conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z 
in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v 
conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z 
in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; func_echo_all "$list"'
             ;;
           *)
             if test yes = "$GXX"; then
@@ -6879,7 +6878,7 @@ if test yes != "$_lt_caught_CXX_error"; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v 
conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z 
in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; func_echo_all "$list"'
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v 
conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z 
in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; func_echo_all "$list"'
            ;;
           *)
            if test yes = "$GXX"; then
@@ -7218,7 +7217,7 @@ if test yes != "$_lt_caught_CXX_error"; then
              # Commands to make compiler produce verbose output that lists
              # what "hidden" libraries, object files and flags are used when
              # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 
2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 
2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
            else
              # FIXME: insert proper C++ library support
@@ -7302,7 +7301,7 @@ if test yes != "$_lt_caught_CXX_error"; then
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v 
conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v 
conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              else
                # g++ 2.7 appears to require '-G' NOT '-shared' on this
                # platform.
@@ -7313,7 +7312,7 @@ if test yes != "$_lt_caught_CXX_error"; then
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 
2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 
2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
              fi
 
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index 852c758..f5487ff 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -24,10 +24,11 @@ anastasis_httpd_LDADD = \
   $(top_builddir)/src/stasis/libanastasisdb.la \
   -lmicrohttpd \
   -ljansson \
+  -ltalermhd \
   -lgnunetcurl \
   -lgnunetrest \
   -lgnunetjson \
   -lgnunetutil
 
 EXTRA_DIST = \
-  $(pkgcfg_DATA)
\ No newline at end of file
+  $(pkgcfg_DATA)
diff --git a/src/backend/anastasis-httpd b/src/backend/anastasis-httpd
index c092563..18fa0c9 100755
--- a/src/backend/anastasis-httpd
+++ b/src/backend/anastasis-httpd
@@ -1,7 +1,7 @@
 #! /bin/bash
 
 # anastasis-httpd - temporary wrapper script for .libs/anastasis-httpd
-# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-9
+# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
 #
 # The anastasis-httpd program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -90,7 +90,7 @@ func_parse_lt_options ()
 
   # Print the debug banner immediately:
   if test -n "$lt_option_debug"; then
-    echo "anastasis-httpd:anastasis-httpd:$LINENO: libtool wrapper (GNU 
libtool) 2.4.6 Debian-2.4.6-9" 1>&2
+    echo "anastasis-httpd:anastasis-httpd:$LINENO: libtool wrapper (GNU 
libtool) 2.4.6 Debian-2.4.6-2" 1>&2
   fi
 }
 
@@ -188,7 +188,7 @@ func_exec_program ()
 
   if test -f "$progdir/$program"; then
     # Add our own library path to LD_LIBRARY_PATH
-    
LD_LIBRARY_PATH="/home/grothoff/research/taler/anastasis/src/util/.libs:/home/grothoff/research/taler/anastasis/src/stasis/.libs:/home/grothoff/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
+    
LD_LIBRARY_PATH="/home/grothoff/taler/anastasis/src/util/.libs:/home/grothoff/taler/anastasis/src/stasis/.libs:/home/grothoff/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
 
     # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH
     # The second colon is a workaround for a bug in BeOS R4 sed
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index 5aca436..92bd093 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -21,6 +21,7 @@
 #include "platform.h"
 #include <microhttpd.h>
 #include <gnunet/gnunet_util_lib.h>
+#include <taler/taler_mhd_lib.h>
 #include "anastasis-httpd_responses.h"
 #include "anastasis-httpd.h"
 #include "anastasis-httpd_parsing.h"
@@ -34,11 +35,6 @@
  */
 #define UNIX_BACKLOG 500
 
-/**
- * The port we are running on
- */
-static long long unsigned port;
-
 /**
  * Should a "Connection: close" header be added to each HTTP response?
  */
@@ -59,17 +55,6 @@ static int result;
  */
 static struct MHD_Daemon *mhd;
 
-/**
- * Path for the unix domain-socket
- * to run the daemon on.
- */
-static char *serve_unixpath;
-
-/**
- * File mode for unix-domain socket.
- */
-static mode_t unixpath_mode;
-
 /**
  * Connection handle to the our database
  */
@@ -457,10 +442,15 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *config)
 {
   int fh;
+  uint16_t port;
+  enum TALER_MHD_GlobalOptions go;
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Starting anastasis-httpd\n");
-
+  go = TALER_MHD_GO_NONE;
+  if (TMH_anastasis_connection_close)
+    go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;
+  TALER_MHD_setup (go);
   result = GNUNET_SYSERR;
   GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
                                  NULL);
@@ -475,243 +465,14 @@ run (void *cls,
     return;
   }
 
+  fh = TALER_MHD_bind (config,
+                       "anastasis",
+                       &port);
+  if ( (0 == port) &&
+       (-1 == fh) )
   {
-    const char *choices[] = {"tcp",
-                             "unix",
-                             NULL};
-
-    const char *serve_type;
-
-    if (GNUNET_OK !=
-        GNUNET_CONFIGURATION_get_value_choice (config,
-                                               "anastasis",
-                                               "SERVE",
-                                               choices,
-                                               &serve_type))
-    {
-      GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
-                                 "anastasis",
-                                 "SERVE",
-                                 "serve type required");
-      GNUNET_SCHEDULER_shutdown ();
-      return;
-    }
-
-    if (0 == strcmp (serve_type, "unix"))
-    {
-      struct sockaddr_un *un;
-      char *mode;
-      struct GNUNET_NETWORK_Handle *nh;
-
-      if (GNUNET_OK !=
-          GNUNET_CONFIGURATION_get_value_filename (config,
-                                                   "anastasis",
-                                                   "unixpath",
-                                                   &serve_unixpath))
-      {
-        GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
-                                   "anastasis",
-                                   "unixpath",
-                                   "unixpath required");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-
-      if (strlen (serve_unixpath) >= sizeof (un->sun_path))
-      {
-        fprintf (stderr,
-                 "Invalid configuration: unix path too long\n");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-
-      if (GNUNET_OK !=
-          GNUNET_CONFIGURATION_get_value_string (config,
-                                                 "anastasis",
-                                                 "UNIXPATH_MODE",
-                                                 &mode))
-      {
-        GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                                   "anastasis",
-                                   "UNIXPATH_MODE");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      errno = 0;
-      unixpath_mode = (mode_t) strtoul (mode, NULL, 8);
-      if (0 != errno)
-      {
-        GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
-                                   "anastasis",
-                                   "UNIXPATH_MODE",
-                                   "must be octal number");
-        GNUNET_free (mode);
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      GNUNET_free (mode);
-
-      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                  "Creating listen socket '%s' with mode %o\n",
-                  serve_unixpath, unixpath_mode);
-
-      if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (serve_unixpath))
-      {
-        GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
-                                  "mkdir",
-                                  serve_unixpath);
-      }
-
-      un = GNUNET_new (struct sockaddr_un);
-      un->sun_family = AF_UNIX;
-      strncpy (un->sun_path,
-               serve_unixpath,
-               sizeof (un->sun_path) - 1);
-
-      GNUNET_NETWORK_unix_precheck (un);
-
-      if (NULL == (nh = GNUNET_NETWORK_socket_create (AF_UNIX,
-                                                      SOCK_STREAM,
-                                                      0)))
-      {
-        GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                             "socket(AF_UNIX)");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      if (GNUNET_OK !=
-          GNUNET_NETWORK_socket_bind (nh,
-                                      (void *) un,
-                                      sizeof (struct sockaddr_un)))
-      {
-        GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                             "bind(AF_UNIX)");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      if (GNUNET_OK !=
-          GNUNET_NETWORK_socket_listen (nh,
-                                        UNIX_BACKLOG))
-      {
-        GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                             "listen(AF_UNIX)");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-
-      fh = GNUNET_NETWORK_get_fd (nh);
-      GNUNET_NETWORK_socket_free_memory_only_ (nh);
-      if (0 != chmod (serve_unixpath,
-                      unixpath_mode))
-      {
-        GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                             "chmod");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      port = 0;
-    }
-    else if (0 == strcmp (serve_type, "tcp"))
-    {
-      char *bind_to;
-
-      if (GNUNET_SYSERR ==
-          GNUNET_CONFIGURATION_get_value_number (config,
-                                                 "anastasis",
-                                                 "PORT",
-                                                 &port))
-      {
-        GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                                   "anastasis",
-                                   "PORT");
-        GNUNET_SCHEDULER_shutdown ();
-        return;
-      }
-      if (GNUNET_OK ==
-          GNUNET_CONFIGURATION_get_value_string (config,
-                                                 "anastasis",
-                                                 "BIND_TO",
-                                                 &bind_to))
-      {
-        char port_str[6];
-        struct addrinfo hints;
-        struct addrinfo *res;
-        int ec;
-        struct GNUNET_NETWORK_Handle *nh;
-
-        GNUNET_snprintf (port_str,
-                         sizeof (port_str),
-                         "%u",
-                         (uint16_t) port);
-        memset (&hints, 0, sizeof (hints));
-        hints.ai_family = AF_UNSPEC;
-        hints.ai_socktype = SOCK_STREAM;
-        hints.ai_protocol = IPPROTO_TCP;
-        hints.ai_flags = AI_PASSIVE
-#ifdef AI_IDN
-                         | AI_IDN
-#endif
-        ;
-        if (0 !=
-            (ec = getaddrinfo (bind_to,
-                               port_str,
-                               &hints,
-                               &res)))
-        {
-          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                      "Failed to resolve BIND_TO address `%s': %s\n",
-                      bind_to,
-                      gai_strerror (ec));
-          GNUNET_free (bind_to);
-          GNUNET_SCHEDULER_shutdown ();
-          return;
-        }
-        GNUNET_free (bind_to);
-
-        if (NULL == (nh = GNUNET_NETWORK_socket_create (res->ai_family,
-                                                        res->ai_socktype,
-                                                        res->ai_protocol)))
-        {
-          GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                               "socket");
-          freeaddrinfo (res);
-          GNUNET_SCHEDULER_shutdown ();
-          return;
-        }
-        if (GNUNET_OK !=
-            GNUNET_NETWORK_socket_bind (nh,
-                                        res->ai_addr,
-                                        res->ai_addrlen))
-        {
-          GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                               "bind");
-          freeaddrinfo (res);
-          GNUNET_SCHEDULER_shutdown ();
-          return;
-        }
-        freeaddrinfo (res);
-        if (GNUNET_OK !=
-            GNUNET_NETWORK_socket_listen (nh,
-                                          UNIX_BACKLOG))
-        {
-          GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
-                               "listen");
-          GNUNET_SCHEDULER_shutdown ();
-          return;
-        }
-        fh = GNUNET_NETWORK_get_fd (nh);
-        GNUNET_NETWORK_socket_free_memory_only_ (nh);
-      }
-      else
-      {
-        fh = -1;
-      }
-    }
-    else
-    {
-      // not reached
-      GNUNET_assert (0);
-    }
+    GNUNET_SCHEDULER_shutdown ();
+    return;
   }
   mhd = MHD_start_daemon (MHD_USE_SUSPEND_RESUME | MHD_USE_DUAL_STACK,
                           port,
diff --git a/src/backend/anastasis-httpd_truth.c 
b/src/backend/anastasis-httpd_truth.c
index bdfc03d..7e05c1a 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -34,16 +34,16 @@
  */
 int
 AH_handler_truth_GET (struct MHD_Connection *connection,
-                       const char *url,
-                       void **con_cls)
+                      const char *url,
+                      void **con_cls)
 {
-  //FIXME: Handle truth get
+  // FIXME: Handle truth get
   return MHD_NO;
 }
 
 /**
  * @param connection the MHD connection to handle
- * @param con_cls the connection's closure 
+ * @param con_cls the connection's closure
  * @param url handles a URL of the format "/truth/$UUID"
  * @param upload_data upload data (truth)
  * @param upload_data_size number of bytes (left) in @a upload_data
@@ -51,11 +51,11 @@ AH_handler_truth_GET (struct MHD_Connection *connection,
  */
 int
 AH_handler_truth_POST (struct MHD_Connection *connection,
-                        void **con_cls,
-                        const char *url,
-                        const char *upload_data,
-                        size_t *upload_data_size)
+                       void **con_cls,
+                       const char *url,
+                       const char *upload_data,
+                       size_t *upload_data_size)
 {
-  //FIXME: Handle truth get
+  // FIXME: Handle truth get
   return MHD_NO;
 }
diff --git a/src/backend/anastasis-httpd_truth.h 
b/src/backend/anastasis-httpd_truth.h
index 96f93ac..6529826 100644
--- a/src/backend/anastasis-httpd_truth.h
+++ b/src/backend/anastasis-httpd_truth.h
@@ -32,12 +32,12 @@
  */
 int
 AH_handler_truth_GET (struct MHD_Connection *connection,
-                       const char *url,
-                       void **con_cls);
+                      const char *url,
+                      void **con_cls);
 
 /**
  * @param connection the MHD connection to handle
- * @param con_cls the connection's closure 
+ * @param con_cls the connection's closure
  * @param url handles a URL of the format "/truth/$UUID"
  * @param upload_data upload data (truth)
  * @param upload_data_size number of bytes (left) in @a upload_data
@@ -45,10 +45,10 @@ AH_handler_truth_GET (struct MHD_Connection *connection,
  */
 int
 AH_handler_truth_POST (struct MHD_Connection *connection,
-                        void **con_cls,
-                        const char *url,
-                        const char *upload_data,
-                        size_t *upload_data_size);
+                       void **con_cls,
+                       const char *url,
+                       const char *upload_data,
+                       size_t *upload_data_size);
 
 
 #endif
\ No newline at end of file
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 5ab40c9..7d4494b 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -370,8 +370,8 @@ Makefile: $(srcdir)/Makefile.in 
$(top_builddir)/config.status
          *config.status*) \
            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
          *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles);; \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
@@ -462,10 +462,7 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(BUILT_SOURCES)
-       $(MAKE) $(AM_MAKEFLAGS) distdir-am
-
-distdir-am: $(DISTFILES)
+distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
diff --git a/src/include/anastasis_service.h b/src/include/anastasis_service.h
index 88f90bd..bdb5063 100644
--- a/src/include/anastasis_service.h
+++ b/src/include/anastasis_service.h
@@ -180,7 +180,7 @@ ANASTASIS_policy_store (struct GNUNET_CURL_Context *ctx,
                         ANASTASIS_AccountPubP *anastasis_pub,
                         const void *policy_data,
                         size_t policy_data_size,
-                        const struct 
+                        const struct
                         ANASTASIS_PaymentSecretP *paymentSecretP,
                         ANASTASIS_PolicyStoreCallback cb,
                         void *cb_cls);
diff --git a/src/lib/test_anastasis_api.c b/src/lib/test_anastasis_api.c
index 2354660..f6e5307 100644
--- a/src/lib/test_anastasis_api.c
+++ b/src/lib/test_anastasis_api.c
@@ -341,7 +341,7 @@ run (void *cls,
     TALER_TESTING_cmd_batch ("policy",
                              policy),
 
-    
+
     /**
      * End the suite.  Fixme: better to have a label for this
      * too, as it shows a "(null)" token on logs.
diff --git a/src/lib/testing_api_cmd_policy.c b/src/lib/testing_api_cmd_policy.c
index 80adee2..8efc599 100644
--- a/src/lib/testing_api_cmd_policy.c
+++ b/src/lib/testing_api_cmd_policy.c
@@ -78,7 +78,7 @@ struct PolicyStoreState
 
 
 /**
- * State for a "policy lookup" CMD.  
+ * State for a "policy lookup" CMD.
  */
 struct PolicyLookupState
 {
@@ -138,7 +138,7 @@ policy_store_run (void *cls,
                                      sizeof (pss->policy_data),
                                      pss->payment_id,
                                      NULL,
-                                     //&policy_store_cb,
+                                     // &policy_store_cb,
                                      pss);
   GNUNET_assert (NULL != pss->pso);
 }
@@ -166,7 +166,7 @@ policy_store_cleanup (void *cls,
     pss->pso = NULL;
   }
 
-  //GNUNET_free_non_null ((void *) pss->order_id);
+  // GNUNET_free_non_null ((void *) pss->order_id);
   GNUNET_free (pss);
 }
 
diff --git a/src/stasis/Makefile.am b/src/stasis/Makefile.am
index 53f975b..1d53aa8 100644
--- a/src/stasis/Makefile.am
+++ b/src/stasis/Makefile.am
@@ -15,12 +15,25 @@ if USE_COVERAGE
   XLIB = -lgcov
 endif
 
+bin_PROGRAMS = \
+  anastasis-dbinit
+
+anastasis_dbinit_SOURCES = \
+  anastasis-dbinit.c
+
+anastasis_dbinit_LDADD = \
+  $(LIBGCRYPT_LIBS) \
+  -lanastasisdb \
+  -lgnunetutil \
+  -ltalerutil \
+  -ltalerpq
+
+
 lib_LTLIBRARIES = \
   libanastasisdb.la
 
 libanastasisdb_la_SOURCES = \
   anastasis_db_plugin.c
-
 libanastasisdb_la_LIBADD = \
   -lgnunetpq \
   -lpq \
diff --git a/src/util/anastasis-dbinit.c b/src/stasis/anastasis-dbinit.c
similarity index 99%
rename from src/util/anastasis-dbinit.c
rename to src/stasis/anastasis-dbinit.c
index fc570ec..7a89faa 100644
--- a/src/util/anastasis-dbinit.c
+++ b/src/stasis/anastasis-dbinit.c
@@ -50,7 +50,7 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   struct ANASTASIS_DatabasePlugin *plugin;
-  
+
   if (NULL ==
       (plugin = ANASTASIS_DB_plugin_load (cfg)))
   {
diff --git a/src/stasis/anastasis_db_plugin.c b/src/stasis/anastasis_db_plugin.c
index 8bfd7bd..b0ebf02 100644
--- a/src/stasis/anastasis_db_plugin.c
+++ b/src/stasis/anastasis_db_plugin.c
@@ -58,7 +58,7 @@ ANASTASIS_DB_plugin_load (const struct 
GNUNET_CONFIGURATION_Handle *cfg)
   plugin = GNUNET_PLUGIN_load (lib_name, cfg_dup);
   if (NULL != plugin)
     plugin->library_name = lib_name;
-  else 
+  else
     GNUNET_free (lib_name);
   GNUNET_CONFIGURATION_destroy (cfg_dup);
   return plugin;
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 6dfa506..4736d81 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -27,15 +27,3 @@ libanastasisutil_la_LDFLAGS = \
   -export-dynamic -no-undefined
 
 
-bin_PROGRAMS = \
-  anastasis-dbinit
-
-anastasis_dbinit_SOURCES = \
-  anastasis-dbinit.c
-
-anastasis_dbinit_LDADD = \
-  $(LIBGCRYPT_LIBS) \
-  -lanastasisdb \
-  -lgnunetutil \
-  -ltalerutil \
-  -ltalerpq

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



reply via email to

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