gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 01/04: handling for zero cost


From: gnunet
Subject: [taler-anastasis] 01/04: handling for zero cost
Date: Tue, 16 Jun 2020 15:25:45 +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 041ea16f962c147796ca633e98fb074d817d0077
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Mon Jun 15 12:00:10 2020 +0000

    handling for zero cost
---
 doc/ledger/illustration/system-architecture.svg | 671 ++++++++++++------------
 src/backend/anastasis-httpd.c                   |  18 +
 src/backend/anastasis-httpd.h                   |   5 +
 src/backend/anastasis-httpd_policy_upload.c     |  30 ++
 src/lib/test_anastasis_api.c                    |  11 +
 src/lib/test_anastasis_api.conf                 |   1 +
 src/stasis/Datenbank-Schema.xml                 |   2 +-
 src/stasis/plugin_anastasis_postgres.c          |   6 +-
 8 files changed, 416 insertions(+), 328 deletions(-)

diff --git a/doc/ledger/illustration/system-architecture.svg 
b/doc/ledger/illustration/system-architecture.svg
index 25d43f3..00f0595 100644
--- a/doc/ledger/illustration/system-architecture.svg
+++ b/doc/ledger/illustration/system-architecture.svg
@@ -7,37 +7,37 @@
    xmlns="http://www.w3.org/2000/svg";
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
-   sodipodi:docname="system-architecture.svg"
-   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
-   id="svg8"
-   version="1.1"
-   viewBox="0 0 210 297"
-   height="297mm"
-   width="210mm"
-   
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/ledger/illustration/system-architecture.png"
+   inkscape:export-ydpi="232.22856"
    inkscape:export-xdpi="232.22856"
-   inkscape:export-ydpi="232.22856">
+   
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/ledger/illustration/system-architecture.png"
+   width="210mm"
+   height="297mm"
+   viewBox="0 0 210 297"
+   version="1.1"
+   id="svg8"
+   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
+   sodipodi:docname="system-architecture.svg">
   <defs
      id="defs2" />
   <sodipodi:namedview
-     inkscape:window-maximized="1"
-     inkscape:window-y="0"
-     inkscape:window-x="0"
-     inkscape:window-height="1055"
-     inkscape:window-width="1920"
-     showgrid="false"
-     inkscape:document-rotation="0"
-     inkscape:current-layer="layer1"
-     inkscape:document-units="mm"
-     inkscape:cy="369.24639"
-     inkscape:cx="422.59885"
-     inkscape:zoom="0.98994949"
-     inkscape:pageshadow="2"
-     inkscape:pageopacity="0.0"
-     borderopacity="1.0"
-     bordercolor="#666666"
+     id="base"
      pagecolor="#ffffff"
-     id="base" />
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="422.59885"
+     inkscape:cy="369.24639"
+     inkscape:document-units="mm"
+     inkscape:current-layer="layer1"
+     inkscape:document-rotation="0"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1028"
+     inkscape:window-x="1920"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1" />
   <metadata
      id="metadata5">
     <rdf:RDF>
@@ -51,422 +51,447 @@
     </rdf:RDF>
   </metadata>
   <g
-     id="layer1"
+     inkscape:label="Ebene 1"
      inkscape:groupmode="layer"
-     inkscape:label="Ebene 1">
+     id="layer1">
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       y="0.5754323"
-       x="59.279423"
-       height="89.917648"
-       width="91.441154"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.865"
        id="rect10"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.865" />
+       width="91.441154"
+       height="89.917648"
+       x="59.279423"
+       y="0.5754323"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856" />
     <g
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g268"
        inkscape:export-xdpi="232.22856"
-       id="g268">
+       inkscape:export-ydpi="232.22856">
       <g
-         id="g235"
-         transform="translate(0,18.909963)">
+         transform="translate(0,18.909963)"
+         id="g235">
         <rect
-           y="56.65221"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-7"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="56.65221" />
         <text
-           id="text230"
-           y="66.469841"
-           x="3.1667819"
+           xml:space="preserve"
            
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="stroke-width:0.264583"
-             y="66.469841"
-             x="3.1667819"
+           x="3.1667819"
+           y="66.469841"
+           id="text230"><tspan
+             sodipodi:role="line"
              id="tspan228"
-             sodipodi:role="line">VIDEO INDENT</tspan></text>
+             x="3.1667819"
+             y="66.469841"
+             style="stroke-width:0.264583">VIDEO INDENT</tspan></text>
       </g>
       <g
          id="g250">
         <rect
-           y="0.35112599"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-3"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="0.35112599" />
         <text
-           id="text213"
-           y="10.168754"
-           x="19.542526"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="10.168754"
-             x="19.542526"
+           x="19.542526"
+           y="10.168754"
+           id="text213"><tspan
+             sodipodi:role="line"
              id="tspan211"
-             sodipodi:role="line">SMS</tspan></text>
+             x="19.542526"
+             y="10.168754"
+             style="font-size:6.35px;stroke-width:0.264583">SMS</tspan></text>
       </g>
       <g
-         id="g245"
-         transform="translate(0,6.3033213)">
+         transform="translate(0,6.3033213)"
+         id="g245">
         <rect
-           y="19.118155"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-9"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="19.118155" />
         <text
-           id="text217"
-           y="28.938883"
-           x="15.282321"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="28.938883"
-             x="15.282321"
+           x="15.282321"
+           y="28.938883"
+           id="text217"><tspan
+             sodipodi:role="line"
              id="tspan215"
-             sodipodi:role="line">E-MAIL</tspan></text>
+             x="15.282321"
+             y="28.938883"
+             
style="font-size:6.35px;stroke-width:0.264583">E-MAIL</tspan></text>
       </g>
       <g
-         id="g240"
-         transform="translate(0,12.606645)">
+         transform="translate(0,12.606645)"
+         id="g240">
         <rect
-           y="37.885185"
-           x="0.35112599"
-           height="15.012281"
-           width="51.988171"
+           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
            id="rect12-6-0"
-           style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252" />
+           width="51.988171"
+           height="15.012281"
+           x="0.35112599"
+           y="37.885185" />
         <text
-           id="text226"
-           y="47.702812"
-           x="4.569797"
+           xml:space="preserve"
            
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-           xml:space="preserve"><tspan
-             style="font-size:6.35px;stroke-width:0.264583"
-             y="47.702812"
-             x="4.569797"
+           x="4.569797"
+           y="47.702812"
+           id="text226"><tspan
+             sodipodi:role="line"
              id="tspan224"
-             sodipodi:role="line">POST INDENT</tspan></text>
+             x="4.569797"
+             y="47.702812"
+             style="font-size:6.35px;stroke-width:0.264583">POST 
INDENT</tspan></text>
       </g>
     </g>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-7-2"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="75.562172"
        x="157.66071"
-       y="75.562172" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-7-2"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       x="159.0997"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text230-0"
        y="85.379799"
-       id="text230-0"><tspan
-         sodipodi:role="line"
-         id="tspan228-2"
-         x="159.0997"
+       x="159.0997"
+       
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="stroke-width:0.264583"
          y="85.379799"
-         style="stroke-width:0.264583">NOTIFICATIONS</tspan></text>
+         x="159.0997"
+         id="tspan228-2"
+         sodipodi:role="line">NOTIFICATIONS</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-3-7"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="0.35112599"
        x="157.66071"
-       y="0.35112599" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-3-7"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="162.63747"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text213-5"
        y="10.168754"
-       id="text213-5"><tspan
-         sodipodi:role="line"
-         id="tspan211-9"
-         x="162.63747"
+       x="162.63747"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="10.168754"
-         
style="font-size:6.35px;stroke-width:0.264583">MONITORING</tspan></text>
+         x="162.63747"
+         id="tspan211-9"
+         sodipodi:role="line">MONITORING</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-9-2"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="25.421476"
        x="157.66071"
-       y="25.421476" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-9-2"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="162.43127"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text217-8"
        y="35.239105"
-       id="text217-8"><tspan
-         sodipodi:role="line"
-         id="tspan215-9"
-         x="162.43127"
+       x="162.43127"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="35.239105"
-         
style="font-size:6.35px;stroke-width:0.264583">ACCOUNTING</tspan></text>
+         x="162.43127"
+         id="tspan215-9"
+         sodipodi:role="line">ACCOUNTING</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
-       id="rect12-6-0-3"
-       width="51.988171"
-       height="15.012281"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="50.491829"
        x="157.66071"
-       y="50.491829" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       height="15.012281"
+       width="51.988171"
+       id="rect12-6-0-3"
+       style="fill:#fff6d5;stroke:#000000;stroke-width:0.702252"
        inkscape:export-xdpi="232.22856"
-       xml:space="preserve"
-       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
-       x="168.75803"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="text226-6"
        y="60.309456"
-       id="text226-6"><tspan
-         sodipodi:role="line"
-         id="tspan224-1"
-         x="168.75803"
+       x="168.75803"
+       
style="font-style:normal;font-weight:normal;font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
+       xml:space="preserve"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         style="font-size:6.35px;stroke-width:0.264583"
          y="60.309456"
-         style="font-size:6.35px;stroke-width:0.264583">BACKUPS</tspan></text>
+         x="168.75803"
+         id="tspan224-1"
+         sodipodi:role="line">BACKUPS</tspan></text>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g426"
        transform="translate(0,-1.1374593)"
-       id="g426">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         y="96.170982"
-         x="59.279423"
-         height="57.691296"
-         width="19.228834"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.740319"
          id="rect79-5"
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.740319" />
+         width="19.228834"
+         height="57.691296"
+         x="59.279423"
+         y="96.170982" />
       <text
-         xml:space="preserve"
-         
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         x="-143.11784"
-         y="71.20533"
+         transform="rotate(-90)"
          id="text363"
-         transform="rotate(-90)"><tspan
-           sodipodi:role="line"
-           id="tspan361"
-           x="-143.11784"
+         y="71.20533"
+         x="-143.11784"
+         
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+         xml:space="preserve"><tspan
+           style="stroke-width:0.264583"
            y="71.20533"
-           style="stroke-width:0.264583">GNU TALER</tspan></text>
+           x="-143.11784"
+           id="tspan361"
+           sodipodi:role="line">GNU TALER</tspan></text>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g421"
        inkscape:export-xdpi="232.22856"
-       id="g421">
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-9"
-         width="19.228834"
-         height="57.691296"
+         y="95.033524"
          x="83.350197"
-         y="95.033524" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-9"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <g
          id="g415">
         <text
-           xml:space="preserve"
-           
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-           x="-145.498"
-           y="94.911781"
+           transform="rotate(-90)"
            id="text363-2"
-           transform="rotate(-90)"><tspan
-             sodipodi:role="line"
-             id="tspan361-9"
-             x="-145.498"
+           y="94.911781"
+           x="-145.498"
+           
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+           xml:space="preserve"><tspan
+             style="stroke-width:0.264583"
              y="94.911781"
-             style="stroke-width:0.264583">POSTGRESQL</tspan></text>
+             x="-145.498"
+             id="tspan361-9"
+             sodipodi:role="line">POSTGRESQL</tspan></text>
       </g>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g411"
        transform="translate(0,-1.1374588)"
-       id="g411">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-1"
-         width="19.228834"
-         height="57.691296"
+         y="96.170982"
          x="107.42097"
-         y="96.170982" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-1"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <text
-         transform="rotate(-90)"
-         id="text363-3"
-         y="119.34687"
-         x="-138.65456"
+         xml:space="preserve"
          
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         xml:space="preserve"><tspan
-           style="stroke-width:0.264583"
-           y="119.34687"
-           x="-138.65456"
+         x="-138.65456"
+         y="119.34687"
+         id="text363-3"
+         transform="rotate(-90)"><tspan
+           sodipodi:role="line"
            id="tspan361-1"
-           sodipodi:role="line">LIBCURL</tspan></text>
+           x="-138.65456"
+           y="119.34687"
+           style="stroke-width:0.264583">LIBCURL</tspan></text>
     </g>
     <g
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       id="g406"
        transform="translate(0,-1.1374588)"
-       id="g406">
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856">
       <rect
-         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032"
-         id="rect79-5-2"
-         width="19.228834"
-         height="57.691296"
+         y="96.170982"
          x="131.49174"
-         y="96.170982" />
+         height="57.691296"
+         width="19.228834"
+         id="rect79-5-2"
+         style="fill:#fff6d5;stroke:#000000;stroke-width:0.74032" />
       <text
-         transform="rotate(-90)"
-         id="text363-9"
-         y="143.41765"
-         x="-148.82603"
+         xml:space="preserve"
          
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-         xml:space="preserve"><tspan
-           style="stroke-width:0.264583"
-           y="143.41765"
-           x="-148.82603"
+         x="-151.19177"
+         y="143.41765"
+         id="text363-9"
+         transform="rotate(-90)"><tspan
+           sodipodi:role="line"
            id="tspan361-4"
-           sodipodi:role="line">LIBMICROHTTP</tspan></text>
+           x="-151.19177"
+           y="143.41765"
+           style="stroke-width:0.264583">LIBMICROHTTPD</tspan></text>
     </g>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text430"
-       y="8.1892481"
-       x="87.585556"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="8.1892481"
-         x="87.585556"
+       x="87.585556"
+       y="8.1892481"
+       id="text430"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan428"
-         sodipodi:role="line">ANASTASIS</tspan></text>
+         x="87.585556"
+         y="8.1892481"
+         style="stroke-width:0.264583">ANASTASIS</tspan></text>
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       y="69.096367"
-       x="62.343716"
-       height="18.504324"
-       width="85.312561"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
        id="rect432"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865" />
-    <rect
-       inkscape:export-ydpi="232.22856"
+       width="85.312561"
+       height="18.504324"
+       x="62.343716"
+       y="69.096367"
        inkscape:export-xdpi="232.22856"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
-       id="rect432-7"
-       width="85.312569"
-       height="18.504326"
-       x="62.343712"
-       y="47.417034" />
+       inkscape:export-ydpi="232.22856" />
     <rect
-       inkscape:export-ydpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       y="47.417034"
+       x="62.343712"
+       height="18.504326"
+       width="85.312569"
+       id="rect432-7"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.865"
        inkscape:export-xdpi="232.22856"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.48329"
-       id="rect432-8"
-       width="26.093239"
-       height="18.886036"
-       x="62.248283"
-       y="25.017683" />
+       inkscape:export-ydpi="232.22856" />
     <rect
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
        y="25.017683"
-       x="91.953377"
+       x="62.248283"
        height="18.886036"
        width="26.093239"
-       id="rect432-8-4"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291" />
-    <rect
-       inkscape:export-ydpi="232.22856"
+       id="rect432-8"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.48329"
        inkscape:export-xdpi="232.22856"
-       y="25.017683"
-       x="121.65847"
-       height="18.886036"
+       inkscape:export-ydpi="232.22856" />
+    <rect
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291"
+       id="rect432-8-4"
        width="26.093239"
+       height="18.886036"
+       x="91.953377"
+       y="25.017683"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856" />
+    <rect
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291"
        id="rect432-8-5"
-       style="fill:#f9f9f9;stroke:#000000;stroke-width:0.483291" />
-    <text
-       inkscape:export-ydpi="232.22856"
+       width="26.093239"
+       height="18.886036"
+       x="121.65847"
+       y="25.017683"
        inkscape:export-xdpi="232.22856"
-       id="text483"
-       y="80.660019"
-       x="76.017273"
+       inkscape:export-ydpi="232.22856" />
+    <text
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="80.660019"
-         x="76.017273"
+       x="76.017273"
+       y="80.660019"
+       id="text483"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan481"
-         sodipodi:role="line">ANASTASIS HTTPD</tspan></text>
+         x="76.017273"
+         y="80.660019"
+         style="stroke-width:0.264583">ANASTASIS HTTPD</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text487"
-       y="58.980682"
-       x="82.415329"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="58.980682"
-         x="82.415329"
+       x="82.415329"
+       y="58.980682"
+       id="text487"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan485"
-         sodipodi:role="line">LIBANASTASIS</tspan></text>
+         x="82.415329"
+         y="58.980682"
+         style="stroke-width:0.264583">LIBANASTASIS</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text491"
-       y="36.772186"
-       x="70.50605"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="70.50605"
+       x="70.50605"
+       y="36.772186"
+       id="text491"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan489"
-         sodipodi:role="line">CLI</tspan></text>
+         x="70.50605"
+         y="36.772186"
+         style="stroke-width:0.264583">CLI</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text495"
-       y="36.772186"
-       x="97.099701"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="97.099701"
+       x="97.099701"
+       y="36.772186"
+       id="text495"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan493"
-         sodipodi:role="line">TEST</tspan></text>
+         x="97.099701"
+         y="36.772186"
+         style="stroke-width:0.264583">TEST</tspan></text>
     <text
-       inkscape:export-ydpi="232.22856"
-       inkscape:export-xdpi="232.22856"
-       id="text499"
-       y="36.772186"
-       x="126.84045"
+       
inkscape:export-filename="/home/dennis/Nextcloud/Studium-BFH/Aktuell_FS2020/Bachelor-Thesis/ANASTASIS/anastasis/doc/thesis/images/system-architecture.png"
+       xml:space="preserve"
        
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
-       xml:space="preserve"><tspan
-         style="stroke-width:0.264583"
-         y="36.772186"
-         x="126.84045"
+       x="126.84045"
+       y="36.772186"
+       id="text499"
+       inkscape:export-xdpi="232.22856"
+       inkscape:export-ydpi="232.22856"><tspan
+         sodipodi:role="line"
          id="tspan497"
-         sodipodi:role="line">APPS</tspan></text>
+         x="126.84045"
+         y="36.772186"
+         style="stroke-width:0.264583">APPS</tspan></text>
   </g>
 </svg>
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index 11d48b5..7b1db5a 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -60,6 +60,12 @@ struct TALER_Amount AH_annual_fee;
  */
 char *AH_backend_url;
 
+/**
+ * Taler currency.
+ */
+char *AH_currency;
+
+
 /**
  * Our fulfillment URL.
  */
@@ -572,6 +578,18 @@ run (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (config,
+                                             "taler",
+                                             "CURRENCY",
+                                             &AH_currency))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               "taler",
+                               "CURRENCY");
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (config,
                                              "anastasis",
diff --git a/src/backend/anastasis-httpd.h b/src/backend/anastasis-httpd.h
index 1f78555..ff14dbf 100644
--- a/src/backend/anastasis-httpd.h
+++ b/src/backend/anastasis-httpd.h
@@ -151,6 +151,11 @@ extern struct TALER_Amount AH_annual_fee;
  */
 extern char *AH_backend_url;
 
+/**
+ * Taler currency.
+ */
+extern char *AH_currency;
+
 /**
  * Supported methods.
  */
diff --git a/src/backend/anastasis-httpd_policy_upload.c 
b/src/backend/anastasis-httpd_policy_upload.c
index b6a0691..f721498 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -827,10 +827,40 @@ AH_handler_policy_post (struct MHD_Connection *connection,
     {
       struct GNUNET_HashCode hc;
       enum ANASTASIS_DB_QueryStatus qs;
+      struct TALER_Amount zero_cost;
+
+      TALER_amount_get_zero (AH_currency, &zero_cost);
+      if (0 == TALER_amount_cmp (&AH_annual_fee, &zero_cost))
+      {
+        // generate new payment identifier
+        GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
+                                    &puc->payment_identifier,
+                                    sizeof (
+                                      struct ANASTASIS_PaymentSecretP));
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Payment-Identifier generated: %s\n",
+                    TALER_B2S (&puc->payment_identifier));
+
+        int post_counter = 10;
+
+        qs = db->record_payment (db->cls,
+                                 &accountPubP,
+                                 post_counter,
+                                 &puc->payment_identifier,
+                                 &AH_annual_fee);
+        if (qs >= 0)
+        {
+          qs = db->increment_lifetime (db->cls,
+                                       &accountPubP,
+                                       &puc->payment_identifier,
+                                       GNUNET_TIME_UNIT_YEARS);
+        }
+      }
 
       qs = db->lookup_account (db->cls,
                                &accountPubP,
                                &hc);
+
       if (qs < 0)
         return handle_database_error (puc,
                                       qs);
diff --git a/src/lib/test_anastasis_api.c b/src/lib/test_anastasis_api.c
index 0aeff30..fb8ec66 100644
--- a/src/lib/test_anastasis_api.c
+++ b/src/lib/test_anastasis_api.c
@@ -188,6 +188,15 @@ run (void *cls,
 
     // FIXME: Code for policy handling
 
+    ANASTASIS_TESTING_cmd_policy_store ("policy-store-1",
+                                        anastasis_url,
+                                        NULL /* prev upload */,
+                                        NULL /* last upload */,
+                                        MHD_HTTP_PAYMENT_REQUIRED,
+                                        ANASTASIS_TESTING_PSO_NONE,
+                                        "Test-1",
+                                        strlen ("Test-1")),
+
 
     ANASTASIS_TESTING_cmd_policy_store ("policy-store-1",
                                         anastasis_url,
@@ -228,6 +237,8 @@ run (void *cls,
                                          MHD_HTTP_OK,
                                          "policy-store-2"),
 
+
+
     TALER_TESTING_cmd_end ()
   };
 
diff --git a/src/lib/test_anastasis_api.conf b/src/lib/test_anastasis_api.conf
index 8aa1c8f..2a6e052 100644
--- a/src/lib/test_anastasis_api.conf
+++ b/src/lib/test_anastasis_api.conf
@@ -38,6 +38,7 @@ PAYMENT_BACKEND_URL = http://localhost:8080/
 
 # Annual fee we charge.
 ANNUAL_FEE = EUR:4.99
+#ANNUAL_FEE = EUR:0
 
 # Upload limit
 UPLOAD_LIMIT_MB = 1
diff --git a/src/stasis/Datenbank-Schema.xml b/src/stasis/Datenbank-Schema.xml
index 4cbd9ca..0591d22 100644
--- a/src/stasis/Datenbank-Schema.xml
+++ b/src/stasis/Datenbank-Schema.xml
@@ -1 +1 @@
-<mxfile host="www.draw.io" modified="2020-05-14T10:40:44.222Z" 
agent="Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0" 
etag="yZcycUT-wwwuXJpvhy9n" version="12.8.8"><diagram id="UF0pCA7TQTvobU7b0bed" 
name="Seite-1">7V1bc5s4GP01ntl92A53O4+2615mkzaTuLvtk0cBxTDFiBFyYu+vXwkkMBZuiQ0YZtRmJtYVpO/o6Eif5IzM+Wb3EYPYv0MeDEeG5u1G5vuRYeiW7tBfLGafxYwdM4tY48DjmYqIx+A/yCM1HrsNPJiUMhKEQhLE5UgXRRF0SSkOYIxey9meUVh+agzWUIp4dEEox/4beMTnsbpzUyR8gsHa54+eGOMsYQNEZt6SxAceej2IMhcjc44RItmnzW4OQ
 [...]
\ No newline at end of file
+<mxfile host="Electron" modified="2020-06-11T14:26:00.822Z" agent="5.0 (X11; 
Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.2.1 
Chrome/83.0.4103.100 Electron/9.0.3 Safari/537.36" etag="akhPIe-celB06UuOFgWh" 
version="13.2.1" type="device"><diagram id="UF0pCA7TQTvobU7b0bed" 
name="Seite-1">7V1bc9o4GP01zOw+bMdXcB6B0sts0mYSdrd9YhRbwZ7aFiOLBPrrV7IlX5BpXGyDmVGbmaCrLX1HR0f6JDIy59HuIwYb/w55MBwZmrcbme9HhqHrmkF/sZh9FuPYWhaxxoHHMxURj8FPyCNFtm3gwaSSkSAUkmBTjXRRHEOXVOIAxui1mu0ZhdWnbsA
 [...]
\ No newline at end of file
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 661ae65..8a862bf 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -471,14 +471,11 @@ postgres_store_recovery_document (void *cls,
                 "Public key used to query db: %s\n",
                 TALER_B2S (anastasis_pub));
 
-    struct GNUNET_TIME_Absolute ed;
     struct GNUNET_PQ_QueryParam params[] = {
       GNUNET_PQ_query_param_auto_from_type (anastasis_pub),
       GNUNET_PQ_query_param_end
     };
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &ed),
       GNUNET_PQ_result_spec_end
     };
 
@@ -1182,8 +1179,9 @@ postgres_lookup_account (void *cls,
   {
     struct GNUNET_TIME_Absolute expiration_date;
     struct GNUNET_PQ_ResultSpec rs[] = {
+      /* FIXME: DELETE
       GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &expiration_date),
+                                            &expiration_date),*/
       GNUNET_PQ_result_spec_end
     };
 

-- 
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]