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: fix KS state freein


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: fix KS state freeing on exit
Date: Thu, 09 Aug 2018 20:51:48 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new e3f7083  fix KS state freeing on exit
e3f7083 is described below

commit e3f7083b3eb39ed28eee27b6104a3a508437c929
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Aug 9 20:51:42 2018 +0200

    fix KS state freeing on exit
---
 .../.config/taler/account-2.json                   |  4 ++--
 src/exchange/taler-exchange-httpd.c                |  1 +
 src/exchange/taler-exchange-httpd_keystate.c       | 23 +++++++++++++++-------
 src/exchange/taler-exchange-httpd_keystate.h       |  7 +++++++
 4 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json 
b/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json
index aa7256a..b2160e9 100644
--- a/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json
+++ b/src/benchmark/exchange_benchmark_home/.config/taler/account-2.json
@@ -1,5 +1,5 @@
 {
   "url": "payto://x-taler-bank/localhost:8082/2",
-  "salt": 
"KZCTEHKD39TDK9CR9DYHNA5C6RYK1QYCBE1Z0198PBXKK1XTJ3D06CE3Q2QD4ZCED5H16RB9V79QBP5VQ7QRCST36CC4H9P2WAYBMGR",
-  "master_sig": 
"55PBWD75WS0S9CKMGKXQPX9R22YM7CS3AARYXZ2GNZJ76EXB63DX9JY3NWWB4PHAZWRKS54VCHYT8HAYNSX294C0CC7XPQF1Y3Y1628"
+  "salt": 
"S8SBYSZE4CAWMJRWGMS25XYVSVM6KXN4BJYZ34M975MPDDXZ01WAZEMB2139G8VVD8K6FVCR3GSZKNGEQ76XX27HQSM1PPX54SCFYER",
+  "master_sig": 
"J0DHVTAPFB3MY6RRVBX0WGKK7K32XZ7HPKR5JBB6GSQ29AXXFTWM8A1P7STBGKT14YQMYAM4X4EM8GD4FKNDR1MVGK6ANMQYCP9WE0G"
 }
\ No newline at end of file
diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index e80ee5a..71e5c8b 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -1046,6 +1046,7 @@ main (int argc,
     MHD_stop_daemon (mhd);
     break;
   }
+  TEH_KS_free ();
   TALER_EXCHANGEDB_plugin_unload (TEH_plugin);
   TEH_VALIDATION_done ();
   return (GNUNET_SYSERR == ret) ? 1 : 0;
diff --git a/src/exchange/taler-exchange-httpd_keystate.c 
b/src/exchange/taler-exchange-httpd_keystate.c
index 987a938..4d1f888 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -1841,8 +1841,8 @@ TEH_KS_loop (void)
 
   if (0 != pipe (reload_pipe))
   {
-    fprintf (stderr,
-             "Failed to create pipe.\n");
+    GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
+                         "pipe");
     return GNUNET_SYSERR;
   }
   sigusr1 = GNUNET_SIGNAL_handler_install (SIGUSR1,
@@ -1915,11 +1915,6 @@ read_again:
       break;
     }
   }
-  if (NULL != internal_key_state)
-  {
-    TEH_KS_release (internal_key_state);
-    internal_key_state = NULL;
-  }
   GNUNET_SIGNAL_handler_uninstall (sigusr1);
   GNUNET_SIGNAL_handler_uninstall (sigterm);
   GNUNET_SIGNAL_handler_uninstall (sigint);
@@ -1930,6 +1925,20 @@ read_again:
 
 
 /**
+ * Finally release #internal_key_state.
+ */
+void
+TEH_KS_free ()
+{
+  if (NULL != internal_key_state)
+  {
+    TEH_KS_release (internal_key_state);
+    internal_key_state = NULL;
+  }
+}
+
+
+/**
  * Sign the message in @a purpose with the exchange's signing key.
  *
  * FIXME:
diff --git a/src/exchange/taler-exchange-httpd_keystate.h 
b/src/exchange/taler-exchange-httpd_keystate.h
index c332182..29e8cd5 100644
--- a/src/exchange/taler-exchange-httpd_keystate.h
+++ b/src/exchange/taler-exchange-httpd_keystate.h
@@ -78,6 +78,13 @@ TEH_KS_release_ (const char *location,
 
 
 /**
+ * Finally, release #internal_key_state.
+ */
+void
+TEH_KS_free (void);
+
+
+/**
  * Denomination key lookups can be for signing of fresh coins
  * or to validate signatures on existing coins.  As the validity
  * periods for a key differ, the caller must specify which

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



reply via email to

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